little problem w/ pre and post increments...

Alexandre Oliva aoliva@redhat.com
Fri Jun 16 10:18:00 GMT 2000


On Jun 16, 2000, "Fred Baumgarten" <dc6iq@hotmail.com> wrote:

> I tried this one, resulting in different results using optimized code
> or not:

>         int y=x++ + ++x;

You modify the same variable twice without intervening sequence
points.  This invokes undefined behavior.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me



More information about the Gcc-bugs mailing list