Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[intro.memory] Implication of the note for implementation-managed "memory locations" #7303

Open
frederick-vs-ja opened this issue Oct 14, 2024 · 2 comments

Comments

@frederick-vs-ja
Copy link
Contributor

Currently a note in [intro.memory] (originally introduced by N2429) says:

[Note 2: Various features of the language, such as references and virtual functions, might involve additional memory locations that are not accessible to programs but are managed by the implementation. — end note]

This note seemingly implies that such underlying implementation details are scalar objects or bit-field sequences (per the definition of memory location).

Such implication looks weird despite not being actual overspecification. If this note is considered not really helpful (because such a "memory location" isn't supposed to be observable, perhaps), I guess we should remove it.

@jensmaurer
Copy link
Member

Well, the real question is if those hidden memory locations can participate in data races. I think the note wants to say "yes".

@frederick-vs-ja
Copy link
Contributor Author

Well, the real question is if those hidden memory locations can participate in data races. I think the note wants to say "yes".

I think the answer should be "yes" too.

However, the standard wording doesn't recognize any operation as reading or modification of such memory locations, even if the operation is undefined and/or does modify some implemention-managed memory location in the view of the implementation. So I still wonder whether it's helpful to attempt to harmonize the meanings of memory location of the standard and implementations, given when the affected memory regions are implementation-controlled, an implementation may (and possibly need to) consider more cases to be conflicting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants