[Bug middle-end/54066] [4.6] wrong-code at -O0
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jul 22 19:11:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54066
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-07-22 19:11:42 UTC ---
> Lf->Achit += Lf->uint8();
Both the left side and the right side uses Lf->Achit .
The above code is equivalent to:
Lf->Achit = Lf->uint8() + Lf->Achit;
Now the question comes which comes first, the access of Lf->Achit or the
function call Lf->uint8(). The answer is it is (explicitly) unspecified by the
C++ standard.
So the answer is either.
More information about the Gcc-bugs
mailing list