http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56028
--- Comment #4 from Paul E. McKenney <paulmck at linux dot vnet.ibm.com>
2013-01-18 16:22:49 UTC ---
(In reply to comment #3)
> So, what are these "rules of the abstract machine", and why do they allow
> non-atomic store of a large volatile aggregate (it is definitely not atomic,
> right?), and require atomicity for volatile long?
5.17p3 and 5.17p4 do distinguish between non-aggregate and aggregate
assignment:
5.17p3:
"If the left operand is not of class type, the expression is
implicitly converted (Clause 4) to the cv-unqualified type of
the left operand."
5.17p4:
"If the left operand is of class type, the class shall be
complete. Assignment to objects of a class is defined by the
copy/move assignment operator."
Of course, the old-days possibility of systems with 8-bit busses limits how
much the standard can say, but given that the system in question really can do
a 64-bit store, volatile really should force a single store.