This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Incrementing volatiles?
- To: Bill Currie <bcurrie at tssc dot co dot nz>
- Subject: Re: Incrementing volatiles?
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 15 Jul 1998 02:43:29 -0600
- cc: Andreas Schwab <schwab at issan dot informatik dot uni-dortmund dot de>, Horst von Brand <vonbrand at inf dot utfsm dot cl>, Matthias Urlichs <smurf at noris dot de>, egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <35ABFE52.70F0@tssc.co.nz>you write:
> Andreas Schwab wrote:
> > But that would be an awful special case. All accesses to a volatile
> > variable must be exactly as specified by the user, which means that they
> > must never be moved, duplicated or combined.
>
> Eh? The user said `increment bar', not `grab bar, add one to it and
> stuff the value back into bar'. By your definition above, gcc is
> broken.
But you can not increment without first reading its value.
Note, that we are not going to change the meaning of volatile, so debating
this point probably isn't worth the time.
jeff