volatile semantics
Olivier Galibert
galibert@pobox.com
Mon Jul 25 23:08:00 GMT 2005
On Sun, Jul 17, 2005 at 11:56:46AM -0700, Geoffrey Keating wrote:
> "D. Hugh Redelmeier" <hugh@mimosa.com> writes:
> > An object that has volatile-qualified type may be modified in ways
> > unknown to the implementation or have other unknown side
> > effects. Therefore any expression referring to such an object shall be
> > evaluated strictly according to the rules of the abstract machine
>
> The word you missed is 'Therefore'. If an implementation can
> determine that an object is not modified unknown to the
> implementation, the implementation need not evaluate it strictly
> according to the rules of the abstract machine.
I don't read it that way. I read it as "whatever the implementation
may think, it can _not_ determine whether the object may be
modified/has side effects unknown to it".
OG.
More information about the Gcc
mailing list