This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Duplicate data objects in shared libraries
- From: Jason Merrill <jason at redhat dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: "Martin v. Loewis" <martin at v dot loewis dot de>,David Abrahams <david dot abrahams at rcn dot com>,"H . J . Lu" <hjl at lucon dot org>,"drepper at redhat dot com" <drepper at redhat dot com>,"Ralf W. Grosse-Kunstleve" <rwgk at cci dot lbl dot gov>,"gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Mon, 20 May 2002 17:22:38 +0100
- Subject: Re: Duplicate data objects in shared libraries
- References: <46810000.1021876146@warlock.codesourcery.com>
>>>>> "Mark" == Mark Mitchell <mark@codesourcery.com> writes:
> What about:
> static void f() { struct S { virtual void g(); }; }
> There's no guarantee that the name in the RTTI for S will be different
> from a similar class in another translation unit -- but it is true that
> the NTBS will be at a different address since it will be allocated with
> internal linkage.
> In other words, is it really true that comparison by address is just
> an optimization, and not a correctness issue?
A good point, though we could handle this by decorating the RTTI name for S
with the unnamed namespace qualifier. I suppose this sort of thing is what
leads people to want to remove internal linkage entirely.
Jason