This is the mail archive of the gcc-bugs@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: g++ unref symbols


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


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