This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]