Bug 39801 - Builtins are assumed not to throw exceptions, even with -fnon-call-exceptions
Summary: Builtins are assumed not to throw exceptions, even with -fnon-call-exceptions
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-code
Depends on:
Blocks:
 
Reported: 2009-04-17 20:49 UTC by Mark Mitchell
Modified: 2009-04-21 17:47 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-04-21 17:47:29


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Mitchell 2009-04-17 20:49:50 UTC
Some builtin functions are marked as not throwing exceptions, even when -fnon-call-exceptions is in use.  As a result, the compiler will assume these functions will not throw exceptions -- but they might.  For example, the buitin va_arg might cause a SEGV, which would become an exception, if the pointer provided was invalid.  Even builtins which call external library routines might do so, if the routines have themselves been compiled with -fnon-call-exceptions.

For more background, see:

http://gcc.gnu.org/ml/gcc-patches/2009-04/msg00920.html

and follow-ups thereto.
Comment 1 Andrew Pinski 2009-04-21 17:47:29 UTC
Confirmed.