[cfe-dev] C++ and volatile lvalue-to-rvalue

Christopher Jefferson chris at bubblescope.net
Thu Oct 13 08:33:42 PDT 2011


On 13 Oct 2011, at 12:43, Abramo Bagnara wrote:

> 
> I want to put this gcc bug report to clang developer attention.
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50364
> 
> The gcc developers believe that according to the standard
> 
> volatile int v;
> x = v = 3;
> 
> does not imply necessarily a read from v.

If you want to argue that this should both write to, and read from v, then I think you fall foul of lack of a sequence point, so the behaviour is undefined anyway.

Chris



More information about the cfe-dev mailing list