[Bug c/47796] The code to write to a bit_field data strucuture will be removed unexpectedly with gcc 4.5.1 -O2 option
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Feb 21 09:38:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47796
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |jakub at gcc dot gnu.org
Resolution| |INVALID
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-21 08:29:03 UTC ---
Undefined behavior means anything can happen, so wondering why undefined
behavior doesn't always behave the same doesn't make any sense. And, both gcc
4.4.5 and 4.5.2 do warn about this with -Wstrict-aliasing=1 -O2:
pr47796.c:25: warning: dereferencing type-punned pointer might break
strict-aliasing rules
pr47796.c:31: warning: dereferencing type-punned pointer might break
strict-aliasing rules
Please stop reopening this.
More information about the Gcc-bugs
mailing list