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 other/11813] 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



------- Additional Comments From gdr at integrable-solutions dot net  2003-08-06 07:33 -------
Subject: Re:  Make GCC not to assume that C functions can't throw.

"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| I can confirm this. However, I personally think that if you want to make
| this happen (i.e. want to propagate C++ exceptions through C code), then
| you should have to pay the price of giving -fexceptions to the command
| line.

However, that way of doing things require more foresight you can
imagine.  Imagine an X11 library compiled as plain C source with
-fno-exceptions. That library cannot be used reliebly by a C++
programs because if it provides a callback (with C linkage) that might
throw directly of indirectly (most frequent), GCC will not propagate
that exception properly to the program. It will just abort.  That is
an unfortunate situation.

-- Gaby


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