[Bug c++/11813] New: Make GCC not to assume that C functions can't throw.
v dot haisman at sh dot cvut dot cz
gcc-bugzilla@gcc.gnu.org
Tue Aug 5 22:53:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11813
Summary: Make GCC not to assume that C functions can't throw.
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: v dot haisman at sh dot cvut dot cz
CC: gcc-bugs at gcc dot gnu dot org,v dot haisman at sh dot
cvut dot cz
GCC build triplet: *-*-*
GCC host triplet: *-*-*
GCC target triplet: *-*-*
This test case shows that C++ exceptions are not caught across C function calls.
Although this can be cured by supplying -fexceptions for compilation of C files,
it is not always possible solution. For example when the program is linked with
third party's binary C library whose compilation flags can't be controled.
MSVC++ allows user to specify option /EHsc- that enables exceptions and also
stops the compiler from assuming that C functions can't throw. I think that some
users of GCC would like to have similar flag too.
More information about the Gcc-bugs
mailing list