increase in object code size
Torbjorn Lindgren
tl@funcom.no
Wed Sep 24 02:33:00 GMT 1997
On 23 Sep 1997, Jason Merrill wrote:
> > Not when the binary in question is the Linux kernel. In that case, it gets
> > stuck in real memory permanently...
>
> So compile the kernel with -fno-exceptions.
It's C code, and as discussed on comp.lang.c++.moderated throwing
exceptions through C code is usually an extremely bad idea even if does
work on some compilers (you usually get at least resource leaks, and
outright breakage due to inconsistencies may well happen).
Note that this isn't something the compiler can fix, which is why I would
strongly propagate making -fno-exceptions DEFAULT for C code.
If someone really create C code which is exception-safe (it works if
correctly if one of the C++ functions under it throws an exception,
without resource leaks or garbled state information) and really want to
throw exceptions through their *C* code they should use -fexceptions
IMNSHO.
Ref: comp.lang.c++.moderated: 'Exceptions "through" non C++ functions'
--
Torbjörn Lindgren
E-mail: tl@funcom.com
If Santa ever DID deliver presents on Christmas Eve, he's dead now.
More information about the Gcc
mailing list