This is the mail archive of the
mailing list for the GCC project.
Re: Problem with `string', threading and shared libraries.
- To: Gabriel Dos Reis <gdr at codesourcery dot com>
- Subject: Re: Problem with `string', threading and shared libraries.
- From: Tim Hollebeek <tim at hollebeek dot com>
- Date: Fri, 28 Sep 2001 20:40:32 -0400
- Cc: Alexandre Oliva <aoliva at redhat dot com>, Carlo Wood <carlo at alinoe dot com>, gcc-bugs at gcc dot gnu dot org, gcc at gcc dot gnu dot org, stl at sgi dot com, libstdc++ at gcc dot gnu dot org
- References: <20010928164914.A32098@alinoe.com> <email@example.com> <firstname.lastname@example.org>
- Reply-To: tim at hollebeek dot com
On Fri, Sep 28, 2001 at 11:33:27PM +0200, Gabriel Dos Reis wrote:
> Alexandre Oliva <email@example.com> writes:
> | On Sep 28, 2001, Carlo Wood <firstname.lastname@example.org> wrote:
> | > I was wondering, how can it be that `string' has a different
> | > mangling on different compilers/machines? Isn't that a bug?
> | Well, it can be argued that they are actually two different classes,
> If they are really considered to be two different classes, then
> "std::string" is a truly bad choice.
> I don't think V3 should take that word-game stance.
C++ implicitly encourages incompatible implementations to have
incompatible mangling schemes. In the absence of a guarantee (at the
ABI level) that types are compatible, they should have distinct names.
Compatibility of types within ABI families is a useful goal, but where
it doesn't exist (even if only because of threading issues, etc), then
compilers should not compile code just because it "probably" will work.