This is the mail archive of the gcc@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]

Re: Problem with `string', threading and shared libraries.


On Fri, Sep 28, 2001 at 11:33:27PM +0200, Gabriel Dos Reis wrote:
> Alexandre Oliva <aoliva@redhat.com> writes:
> 
> | On Sep 28, 2001, Carlo Wood <carlo@alinoe.com> 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.

-Tim


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