[cfe-dev] GCC and Clang produce undefined references to functions with vague linkage
Rafael EspĂndola
rafael.espindola at gmail.com
Mon Jul 2 09:01:56 PDT 2012
> not well-formed C++, for it violates the one-definition rule in that it
> *lacks* a definition for the virtual member function foo::~foo(). Does
> it make any difference if you add a definition?
Unfortunately no. Replacing the declaration with an inline definition
produces a copy of it in undef.o, but we still get an undefined
reference to ~bar:
nm undef.o | grep D0
U _ZN3barD0Ev
0000000000000000 W _ZN3fooD0Ev
Cheers,
Rafael
More information about the cfe-dev
mailing list