public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/31359]  New: 4.2 branch still generates abort for function casting
@ 2007-03-26  4:33 dirtyepic at gentoo dot org
  2007-03-26  5:02 ` [Bug other/31359] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: dirtyepic at gentoo dot org @ 2007-03-26  4:33 UTC (permalink / raw)
  To: gcc-bugs

The eventual consensus of the ml thread "gcc 4.2 more strict check for 
"function called through a non-compatible    type" [1]:

Mark Mitchell wrote:
> > Ian Lance Taylor wrote:
> > 
>> >> I realized that I am still not stating my position very clearly.  I
>> >> don't think we should make any extra effort to make this code work:
>> >> after all, the code is undefined.  I just think 1) we should not
>> >> insert a trap; 2) we should not ICE. 
> > 
> > I agree.  If the inlining thing is indeed a problem (and I can see how
> > it could be, even though you could not immediately reproduce it), then
> > we should mark the call as uninlinable.  Disabling an optimization in
> > the face of such a cast seems more user-friendly than inserting a trap.
> >  Since we know the code is undefined, we're not pessimizing correct
> > code, so this is not a case where to support old code we'd be holding
> > back performance for valid code.
> > 
> > I also agree with Gaby that we should document this as an extension.  If
> > we go to the work of putting it back in, we should ensure that it
> > continues to work for the foreseeable future.  Part of that is writing
> > down what we've decided.

Was there ever any action on this?  AFAICS consensus was that the trap
would be removed and this behaviour be documented as an extension.
There was a bit more discussion of how exactly the documentation would
be worded and the thread petered out.  Fast forwarding to today the
abort is still present and the 4.2 branch (4.2.0-pre20070317 (rev.
123016)) is still unable to build a working openssl (0.9.8e).

I apologize for bringing this up so late in the release cycle.  I only
found this discussion this weekend while searching for some solution to our
openssl issue, which i believe is the only blocker we have left as far
as being gcc-4.2 ready.

[1] http://gcc.gnu.org/ml/gcc/2006-07/msg00037.html


-- 
           Summary: 4.2 branch still generates abort for function casting
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dirtyepic at gentoo dot org


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug other/31359] 4.2 branch still generates abort for function casting
  2007-03-26  4:33 [Bug other/31359] New: 4.2 branch still generates abort for function casting dirtyepic at gentoo dot org
@ 2007-03-26  5:02 ` pinskia at gcc dot gnu dot org
  2007-03-26  9:14 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-03-26  5:02 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug other/31359] 4.2 branch still generates abort for function casting
  2007-03-26  4:33 [Bug other/31359] New: 4.2 branch still generates abort for function casting dirtyepic at gentoo dot org
  2007-03-26  5:02 ` [Bug other/31359] " pinskia at gcc dot gnu dot org
@ 2007-03-26  9:14 ` rguenth at gcc dot gnu dot org
  2007-03-26 13:27 ` dirtyepic at gentoo dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-03-26  9:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2007-03-26 10:13 -------
openssl is a weird beast of macro hell ;)  (enough reason to fix it...)


-- 


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug other/31359] 4.2 branch still generates abort for function casting
  2007-03-26  4:33 [Bug other/31359] New: 4.2 branch still generates abort for function casting dirtyepic at gentoo dot org
  2007-03-26  5:02 ` [Bug other/31359] " pinskia at gcc dot gnu dot org
  2007-03-26  9:14 ` rguenth at gcc dot gnu dot org
@ 2007-03-26 13:27 ` dirtyepic at gentoo dot org
  2007-03-26 16:19 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: dirtyepic at gentoo dot org @ 2007-03-26 13:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dirtyepic at gentoo dot org  2007-03-26 14:27 -------
All true.  But this report is not about openssl, it's about GCC purposely going
out of it's way to break undefined code for no good reason.  It does silently
crash, for all intents and purposes.  I'm not saying that's not a valid action
for undefined code, just that it was decided that was a Bad Thing and would be
changed.


-- 


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug other/31359] 4.2 branch still generates abort for function casting
  2007-03-26  4:33 [Bug other/31359] New: 4.2 branch still generates abort for function casting dirtyepic at gentoo dot org
                   ` (2 preceding siblings ...)
  2007-03-26 13:27 ` dirtyepic at gentoo dot org
@ 2007-03-26 16:19 ` pinskia at gcc dot gnu dot org
  2007-03-27  0:50 ` dirtyepic at gentoo dot org
  2008-01-08 18:36 ` manu at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-03-26 16:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2007-03-26 17:18 -------
> It does silently crash, for all intents and purposes. 
No, it is not silent at all, it warns loudly (you cannot turn off the warning
except by using -w).


-- 


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug other/31359] 4.2 branch still generates abort for function casting
  2007-03-26  4:33 [Bug other/31359] New: 4.2 branch still generates abort for function casting dirtyepic at gentoo dot org
                   ` (3 preceding siblings ...)
  2007-03-26 16:19 ` pinskia at gcc dot gnu dot org
@ 2007-03-27  0:50 ` dirtyepic at gentoo dot org
  2008-01-08 18:36 ` manu at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: dirtyepic at gentoo dot org @ 2007-03-27  0:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dirtyepic at gentoo dot org  2007-03-27 01:49 -------
I was referring to what the user gets to experience at runtime.


-- 


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug other/31359] 4.2 branch still generates abort for function casting
  2007-03-26  4:33 [Bug other/31359] New: 4.2 branch still generates abort for function casting dirtyepic at gentoo dot org
                   ` (4 preceding siblings ...)
  2007-03-27  0:50 ` dirtyepic at gentoo dot org
@ 2008-01-08 18:36 ` manu at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-01-08 18:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from manu at gcc dot gnu dot org  2008-01-08 17:55 -------
I think the consensus is clear on what needs to be done. So this is confirmed.
Just needs someone to do it. Unfortunately, given the huge amount of open
issues, I would guess that making undefined code work is quite down the list.
Thus, patches are welcome: http://gcc.gnu.org/contribute.html


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu dot org
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-01-08 17:55:17
               date|                            |


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-01-08 17:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-26  4:33 [Bug other/31359] New: 4.2 branch still generates abort for function casting dirtyepic at gentoo dot org
2007-03-26  5:02 ` [Bug other/31359] " pinskia at gcc dot gnu dot org
2007-03-26  9:14 ` rguenth at gcc dot gnu dot org
2007-03-26 13:27 ` dirtyepic at gentoo dot org
2007-03-26 16:19 ` pinskia at gcc dot gnu dot org
2007-03-27  0:50 ` dirtyepic at gentoo dot org
2008-01-08 18:36 ` manu at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).