[Bug c++/13322] operator associativity bug
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Dec 5 20:50:00 GMT 2003
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-12-05 20:50 -------
Not a bug, the problem is that the order of execution is not defined by the C++ or C standard.
So when you do this:
stack(1) = stack[0] + stack[1]; //but stack(1) = 3 is ok
In gcc stack(1) is executed first which cause the variable stack to change becuase you modify stack
in that operator.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Component|debug |c++
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13322
More information about the Gcc-bugs
mailing list