This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/11813] Make GCC not to assume that C functions can't throw.
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Aug 2003 07:33:28 -0000
- Subject: [Bug other/11813] Make GCC not to assume that C functions can't throw.
- References: <20030805225315.11813.v.haisman@sh.cvut.cz>
- 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
------- 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