This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: volatile semantics
- From: Olivier Galibert <galibert at pobox dot com>
- To: Geoffrey Keating <geoffk at geoffk dot org>
- Cc: "D. Hugh Redelmeier" <hugh at mimosa dot com>,Nathan Sidwell <nathan at codesourcery dot com>,Dale Johannesen <dalej at apple dot com>, Mike Stump <mrs at apple dot com>,gcc at gcc dot gnu dot org
- Date: Tue, 26 Jul 2005 01:08:44 +0200
- Subject: Re: volatile semantics
- References: <851D2CB0-93DF-4C49-A6A8-8895DB1A08F9@apple.com> <42778D99.7070904@codesourcery.com> <b0f8ff9938df57bbfda0ec3aea4fc02b@apple.com> <Pine.LNX.4.61.0507161250120.1478@redshift.mimosa.com> <m2ll45gt1t.fsf@greed.local>
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.