This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
RE: Stipping away locale support
- From: Pétur Runólfsson <peturr02 at ru dot is>
- To: <libstdc++ at magfr dot user dot lysator dot liu dot se>,<libstdc++ at gcc dot gnu dot org>
- Date: Mon, 18 Aug 2003 10:39:25 -0000
- Subject: RE: Stipping away locale support
> I am considering (given your last example) if it is the userfriendly
> version of std::terminate that is dragging in all of this for you as
> it is printing demangled names and what not.
This still doesn't explain why locale and iostreams get included in
the executable. After all, the demangler only includes <string> and
<vector>. Here are some theories:
1) Something in the library has #include <iostream>. Even when using
shared libraries this is bad because it has runtime overhead. I can
only find two places,
include/ext/ropeimpl.h
include/stdc++.h
I'm testing a patch for ropeimpl.h, but it also seems wrong for
stdc++.h to include <iostream> and <cassert>.
2) string uses __throw_length_error, which brings in functexcept.cc,
which uses ios_base::failure::failure(), which is defined in ios.cc,
which brings in the rest of locale and iostreams. This can be fixed
by moving __throw_ios_failure or ios_base::failure to separate
source files.
Regards,
Petur