A single historical context of volatile
A single historical context of volatile
Posted Feb 10, 2012 22:22 UTC (Fri) by dfsmith (guest, #20302)Parent article: Betrayed by a bitfield
"... any object ... of a volatile-qualified type should not participate in optimizations that would ... modif[y] the object."
To my mind that prohibition includes non-volatile object optimizations that would clobber volatile objects.
The book then slightly contradicts itself two paragraphs later by saying that "optimizations between sequence points are permitted" before clarifying with a hardware example.
* A standard ANSI C reference manual for programmers and compiler implementers at the time.
