[cpp-threads] memory model
Ben Hutchings
ben at decadentplace.org.uk
Sun May 8 18:35:52 BST 2005
Peter Dimov wrote:
> Peter Dimov wrote:
>
> > Comments on the proposed memory model document:
>
> It took me a while to realize this, but the definition of "canonical
> execution" is flawed.
>
> The C++ abstract machine has no notion of reading from a non-volatile
> variable. That's why "side effects" only includes object modifications.
>
> If you have:
>
> int a = 0;
>
> the value of the expression 'a' is 0. There is no "read" involved in this
> evaluation; the value of 'a' is just zero, period.
<snip>
I was thinking that lvalue-to-rvalue conversion would be a "read",
except for class types, where copying is distinct from this conversion.
Ben.
--
Ben Hutchings
compatible: Gracefully accepts erroneous data from any source
More information about the cpp-threads
mailing list