This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Incrementing volatiles?



  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]