[Bug c/17865] Bad code generation (using -O2 and -O3) on x86 target when using the listed snippet

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Wed Oct 6 19:03:00 GMT 2004


------- Additional Comments From bangerth at dealii dot org  2004-10-06 19:03 -------
Well, to be more precise: if we knew how to formulate the conditions under 
which we are sure that an aliasing violation happens, we'd be happy to  
provide clearer compiler diagnostics. However, this has been discussed many 
times on the mailing lists, and somehow nobody ever came up with a real 
good way to determine wether the aliasing rules are violated or not. 
 
So for the moment: we're sorry, but we don't know how to do that. Your 
code is invoking undefined behavior at runtime, and the standards allow 
the compiler to let this slip by with no diagnostic required. 
 
W. 

-- 


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



More information about the Gcc-bugs mailing list