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/42830] Inlining changes semantics when strict aliasing optimization is enabled



------- Comment #6 from gary at intrepid dot com  2010-01-21 21:33 -------
(In reply to comment #5)
> >Just to be clear, what aspect of the test case is undefined?
> 
> The access of the integer variable via an union.  That is the whole point of
> strict aliasing :).

I thought that might be what you were referring to, and understand how that is
undefined behavior.  It sounds to me like the "resolution" of this issue is
that if the user had compiled with -Wall -Werror, then GCC would have issued
the warning that I'm looking for, but otherwise the test case is just another
casualty of "undefined behavior".


-- 


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


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