That was certainly the intent, although actually doing a read would also
be an acceptable implementation.
For non-volatile objects, sure, because the as-if rule allows it. But for
volatile objects, doing a read where the abstract machine isn't doing one
would be wrong, wouldn't it?
Either an assignment is required to return the value it stores, or it's
allowed to return whatever value it finds in the object after writing to it,
even if the object is volatile and the value is different. I don't think
you can have it both ways, can you?
But a number of people have argued
that the wording in the Standard requires a read. If you think that (as
Kaz seems to), the value read would be the new value, not the prior
value.
And the store must happen before the assignment operator reads its value
back from the object, and the words about it happening before the next
sequence point are unnecessary and redundant.
Then the words about the write happening after the previous sequence point
are unnecessary and redundant, aren't they? The write happens after the
operands of the assignment are evaluated, but before the next sequence
point. Or, according to Kaz, just after the operands are evaluated, before
the value is read back and then passed on to any surrounding operators.
Either way, the restriction on reading the old value really applies to all
reading from the object between the surrounding sequence points, doesn't it
(other than the read-back that Kaz believes is part of the assignment) --
since the store may be the last thing that happens before the next sequence
point, there's no way to reliably read the *new* value from the object
before the next sequence point, is there?
I vaguely remember that the formal model of sequence points that ended up
not making into the standard a while ago seemed to allow the left argument
to an assignment to read the value, like the a[a[0]]=1 example does. Was
that one of the reasons why it was dropped? Or was my interpretation of it
incorrect?...