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/42907] -fstrict-aliasing breaks valid code



------- Comment #25 from steven at gcc dot gnu dot org  2010-01-30 23:19 -------
It should be consistent for programs that do not trigger undefined behavior.
The behavior of your program is undefined according to the C standard and
according to GCC.

The alias discussion is just one of th many where different crowds are asking
for different semantics for undefined behavior. But the point of "undefined" is
that, well, the behavior is undefined. So, although it is counterintuitive (and
in fact, quite unfriendly of the compiler) it is not incorrect to have
different program behavior at different optimization levels for a program with
undefined behavior.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42907


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