This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: g++ unref symbols
- To: Petr Ovchenkov <ptr at ParaGraph dot Ru>
- Subject: Re: g++ unref symbols
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 03 Aug 2000 05:52:53 -0300
- Cc: gcc-bugs at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <14728.14999.948376.245409@gargle.gargle.HOWL><or8zufw915.fsf@guarana.lsd.ic.unicamp.br><14729.2825.659312.264843@gargle.gargle.HOWL><orpunqn5pr.fsf@guarana.lsd.ic.unicamp.br><14729.10392.166467.164794@gargle.gargle.HOWL><ord7jqn44n.fsf@guarana.lsd.ic.unicamp.br><14729.12140.47292.22071@gargle.gargle.HOWL>
On Aug 3, 2000, Petr Ovchenkov <ptr@ParaGraph.Ru> wrote:
> That's was 2.95.2. For later snapshots (mmm, at least since 20000530)
> for A::A scope instead GLOBAL will be LOCAL (on HP)
I see. AFAIK, WEAK symbols are now supported and used on HP. Maybe
they just show up as `t' symbols? Or maybe it is indeed some new bug?
So, summarizing to the list the discussion we've had in private,
given:
h.h:
struct A {
A() {}
virtual void f();
};
x.cc:
#include "h.h"
void A::f() {}
y.cc:
#include "h.h"
A a;
if you compile x.cc and y.cc without optimization, linking fails
because the constructor is defined as local in x.o and not defined at
all in y. Is that correct?
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me