This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/54066] [4.6] wrong-code at -O0
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 22 Jul 2012 19:11:42 +0000
- Subject: [Bug middle-end/54066] [4.6] wrong-code at -O0
- Auto-submitted: auto-generated
- References: <bug-54066-4@http.gcc.gnu.org/bugzilla/>
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.