increase in object code size

Joe Buck jbuck@synopsys.com
Tue Sep 23 10:16:00 GMT 1997


> > You might check to see whether -fno-exceptions has an effect.
> 
> On 80386, -fno-exceptions reduces size by about 25%.  "size -f" on
> SVR4 and similar systems will show the size by section; you should see
> an exception section (.eh_frame) about 30% as large as the code
> section.  This is present even in C code which doesn't use exceptions.

This kind of bloat in C code isn't going to be acceptable for a feature
that is rarely needed (being able to throw exceptions through C code).

At the risk of re-starting a big fight that appeared on the gcc2 list
a while back:

Perhaps -fno-exceptions should be the default for C, while -fexceptions
should be the default for C++.  Folks who need to use exceptions in a
mixed environment can use -fexceptions for C.  C Library functions that
take pointers to functions (qsort) should be compiled with -fexceptions.





More information about the Gcc mailing list