This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/47796] The code to write to a bit_field data strucuture will be removed unexpectedly with gcc 4.5.1 -O2 option


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]