[Bug other/31359] 4.2 branch still generates abort for function casting

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Mar 26 05:02:00 GMT 2007



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-03-26 06:01 -------
Can you show the exact code from openssl which has the problem, there might be
better ways of writting the code instead of what they are doing right now. 
This code is still undefined and I don't think we really should change the
behavior of GCC to be a behavior of code which is undefined.  Before we would
crash on some of the undefined behavior but now we don't and we warn more
places where the undefined behavior happens so that is even better thing.  At
least we don't sliently cause the undefined behavior to be crash (which is
actually valid for the C standard).

I rather see openssl fix their code than GCC change the behavior, it is not
like they were depending on defined behavior and GCC causes defined behavior to
become undefined.  Also if we say this was an "undocumented extension", I think
that is wrong as there is no such thing as an undocumented extension, just it
worked because GCC did not fail before.


-- 


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



More information about the Gcc-bugs mailing list