[LLVMbugs] [Bug 4325] clang: Rev 72572 breaks volatile code

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Jun 4 12:44:14 PDT 2009


Mike Stump <mrs at apple.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Mike Stump <mrs at apple.com>  2009-06-04 14:44:14 ---
>From the standard:

  An assignment expression has the value of the left operand after the

If the left operand is volatile, that means that we must read the operand to
know what the value is.  I aware of the controversy and why you might prefer or
think there should be no read.  The C standard should be improved in this area.
 The C++ standard is perfectly clear however.  I'd recommend pursuing this with
the comp.std.c or the C committee.

As it is, very portable code _must_ not use the value of assignment
expressions, if the lhs is volatile and they do not want it read.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list