Weird result for modulus operation

Andrew Pinski pinskia@gmail.com
Wed Apr 30 06:04:00 GMT 2008


On Tue, Apr 29, 2008 at 8:50 PM, Ang Way Chuang <wcang@nav6.org> wrote:

>         abc.a = abc.a++ % abc.b;

You are assigning to abc.a twice without a sequence point inbetween so
this code is undefined as the order of evaluation of expressions
without a sequence point is unspecified.

Thanks,
Andrew Pinski



More information about the Gcc mailing list