This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11813] New: Make GCC not to assume that C functions can't throw.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]