Specify that atomic_ref member operations with workitem scope are UB.#1021
Specify that atomic_ref member operations with workitem scope are UB.#1021VerenaBeckham wants to merge 10 commits into
Conversation
0624ba8 to
b86ef12
Compare
|
I did a search of the spec for "memory_scope::work_item" to see where else we define behavior for this scope and found:
Both of these have wording like:
This has two problems:
|
You're right. Even if there is no harm in returning memory_scope::work_item from these queries, the way they are described ("scopes supported by atomic operations") implies that they should never return memory_scope::work_item. I have committed a proposal, which defines a set of acceptable values from which to choose. This, I think, neatly circumvents the issue with the "wider"/"narrower" sentence. Perhaps the way the set is defined could be better worded, but let me know what you think of the approach. |
|
I also added some wording to the definition of the work_item scope. Perhaps not strictly necessary, but could be useful? |
Co-authored-by: Greg Lueck <gregory.m.lueck@intel.com>
gmlueck
left a comment
There was a problem hiding this comment.
Looks good! Just a very small comment regarding grammar. Now that the list contains only two things, I think we don't want a comma here.
Co-authored-by: Greg Lueck <gregory.m.lueck@intel.com>
|
Addresses #1004.