patch: <bits/localefwd.h> with -fno-exceptions
Gabriel Dos Reis
Gabriel.Dos-Reis@cmla.ens-cachan.fr
Mon Jan 15 23:21:00 GMT 2001
Harri Porten <porten@kde.org> writes:
| > Nathan Myers <ncm@nospam.cantrip.org> writes:
| >
| > | On Sun, Jan 14, 2001 at 09:10:23PM +0100, Harri Porten wrote:
| > | > Here is a patch that replaces all usage of exception handling in
| > | > <bits/localefwd.h> with the #defines from stl_config.h.
| > |
| > | I don't think we want this. stl_config.h is a hangover from the
| > | SGI STL, which is adapted to run in severely crippled environments.
| > | The rest of the library is not, and we don't mean for it to be.
| >
| > I must confess that I'm not terribly enjoyed (read interested) by the
| > idea of devising hacks to provide and supporte a crippled
| > implementation just to support no-exceptions.
|
| I understand that. Seeing those and similar macros used in stl_bitset.h,
| stl_vector.h and stl_deque.h made me believe that this is the way to go.
|
| Until gcc's eh implementation doesn't improve many people will
| unfortunately be forced to remove every usage of <iostream.h> and
| friends :( I just did that with the KDE core library to produce the
| following comparison of the stripped binary sizes:
|
| 1112924 Jan 15 13:37 libkdecore.so.3.0.0 // with -fno-exceptions.
| 1786696 Jan 15 13:24 libkdecore.so.3.0.0
|
| That's an increase of 60% (or reduction of 38% depending on the way you
| put it).
|
| objectdump shows me ~250 kB in the not-readonly data sections .eh_frame
| and .gcc_except_table.
Thanks for the concrete input.
I think front-end guys (well, they might be the same library guys ;-)
should consider that seriously. Sometime ago, I recall Mark
saying that if something goes wrong because the compiler didn't its
work in the first place, then we should fix the compiler instead of
divising hacks to work around the problem.
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
More information about the Libstdc++
mailing list