[Bug c++/37800] decrementation problem - different result in similar situations
terrix at wp dot pl
gcc-bugzilla@gcc.gnu.org
Fri Oct 10 16:59:00 GMT 2008
------- Comment #2 from terrix at wp dot pl 2008-10-10 16:57 -------
i'm not really sure why there maight be a difference in incrementation behavior
between:
foo(++p, p);
and
foo(++p, p - 1);
looking at the code it is obvious that '++p' is a first operation and the 'p'
or in second example a 'p-1' is a second operation. both operations are done
before call to a foo. isn't it?
so why behaviour of second example is that 'p-1' is executed first and than
'++p'?
note that in other compillers (m$vc), not mentioning other languages (java),
behavious of exampled code is obvious and clear.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37800
More information about the Gcc-bugs
mailing list