This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: Upgrading libstdc++ questions


First of all, gcc-patches is the list for posting patches that will be
applied to the compiler sources, not questions about usage.

Be warned, I might be talking rubbish here ... just trying to help because
noone else has replied ...

On Wed, Aug 28, 2002 at 02:13:18AM -0700, Samir Rajguru wrote:

> I am trying to upgrade libstdc++ on my gcc installation. The version of gcc
> I am using is 2.95.3. The version of libstdc++ I am trying to upgrade to is
> 2.90.8 (the latest version that is supposed to work on 2.95.3).
> 
> Directions say that I need to rebuild libgcc.a along with the new libstdc++
> for things such as namespaces to work correctly (e.g. to use the stl "std"
> namespace).
> 
> However, my current gcc installation already has namespaces correctly
> working (I am able to use the STL "std" namespace, etc.).

As I understand it, the issue isn't being able to use std::, but that you
can use basic_string, vector etc. without qualifying them as being in the
std namespace.
By default GCC 2.95 ignores std:: qualifiers completely. User-defined
namespaces will work fine, but it makes no difference whether you qualify
standard library names with "std::" or not, the compiler ignores it and
acts as though all the standard names are in the global namespace.
I believe that it's this behaviour that's being referred to as namespaces
not working correctly.

Try this (replacing path to libgcc.a as necessary):

nm -C /usr/lib/libgcc.a | fgrep "exception::what(void)"

If exception::what() isn't qualified with std:: then I think you need to
rebuild libgcc.a with the -fhonor-std flag.

Have you tried it? If the instructions say you should then I'd recommend
at least trying it. People who know what they're talking about (i.e. not me)
should be able to help you further.

jon


-- 
sigfault


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