[Bug c++/26820] g++ compiler: incorrect handling of reference parameters

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Mar 23 06:30:00 GMT 2006



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-03-23 06:30 -------
This is not a bug, you are misunderstanding what order stuff gets evaluated in
the following expression:
cout << f(x, y, z) << " " << x << y << z << endl;


The C++ standard leaves the order of evaluating of f(x,y,z), the load of x, y,
and z all up to the compiler and allows that order to be different at different
level of optimizations also.

This is a dup of bug 11751.

*** This bug has been marked as a duplicate of 11751 ***

*** This bug has been marked as a duplicate of 11751 ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26820



More information about the Gcc-bugs mailing list