[Bug c++/56080] Incorrect code generated when changing lvalue of pointer and using inline code and optimizations.
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jan 22 21:58:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56080
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |INVALID
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-01-22 21:57:37 UTC ---
++(*((uint32_t**)&d));
You are violating C/C++ aliasing rules. You are accessing d via void* and also
uint32_t*. To write this correctly is:
d = ((uint32_t*)d)+1;
More information about the Gcc-bugs
mailing list