[Bug other/11813] Make GCC not to assume that C functions can't throw.

gdr at integrable-solutions dot net gcc-bugzilla@gcc.gnu.org
Wed Aug 6 07:33: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



------- 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



More information about the Gcc-bugs mailing list