This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11813] New: Make GCC not to assume that C functions can't throw.
- From: "v dot haisman at sh dot cvut dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Aug 2003 22:53:17 -0000
- Subject: [Bug c++/11813] New: Make GCC not to assume that C functions can't throw.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.