Warn about do nothing expressions?

Timon Gehr timon.gehr at gmx.ch
Fri Mar 28 15:03:48 PDT 2014


On 03/28/2014 10:58 PM, Timon Gehr wrote:
>>
>
> Not really. In C, the evaluation order of assignment and increment is
> actually unspecified and hence a conforming compiler can do it either way.

(Or any other way. Ali is right that in C this is even undefined 
behaviour. Apparently in C++11 only one of the two behaviours can occur.)

http://stackoverflow.com/questions/4176328/undefined-behavior-and-sequence-points


More information about the Digitalmars-d mailing list