Submitter: Batty
Submission Date: 2011-10-14
Source: WG 14
Reference Document:
N1584
Version: 1.0
Date: October 2011
Subject:
Summary
C11 seems to omit the restriction imposed in C++11 in 29.3p7 (from N3291):For atomic operations A and B on an atomic object M, if there are memory_order_seq_cst fences X and Y such that A is sequenced before X, Y is sequenced before B, and X precedes Y in S, then B occurs later than A in the modification order of M.Furthermore, it seems that both C11 and C++11 are missing the following two derivatives of this rule:
For atomic modifications A and B of an atomic object M, if there is a memory_order_seq_cst fence X such that A is sequenced before X, and X precedes B in S, then B occurs later than A in the modification order of M.
For atomic modifications A and B of an atomic object M, if there is a memory_order_seq_cst fence Y such that Y is sequenced before B, and A precedes Y in S, then B occurs later than A in the modification order of M.
Suggested Technical Corrigendum
See above.Committee discussion
Oct 2011 meetingPrevious Defect Report < - > Next Defect Report
- The changes are difficult to fully understand - a diagram might help.
- A paper for the next meeting would help the Committee make progress on this.
- Some concern about having C and C++ differ.