[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#400332: Confirming for g++-4.[34] and gcc-snapshot



I can confirm this bug:

lakeview ok % cat foo.cc
class Class
{
    public:
        virtual ~Class();
        virtual char const *what() const;
};                                       

inline Class::~Class()
{}                    

int main()
{}
lakeview ok % g++-4.3 foo.cc
/tmp/ccsDsdCG.o:(.rodata._ZTV5Class[vtable for Class]+0x20): undefined reference to `Class::what() const'
collect2: ld returned 1 exit status
lakeview no % g++-4.4 foo.cc
/tmp/cc0NApvV.o:(.rodata._ZTV5Class[vtable for Class]+0x20): undefined reference to `Class::what() const'
collect2: ld returned 1 exit status
lakeview no % /usr/lib/gcc-snapshot/bin/g++ foo.cc
/tmp/cc6b2i3u.o:(.rodata._ZTV5Class[vtable for Class]+0x20): undefined reference to `Class::what() const'
collect2: ld returned 1 exit status

All three work if I add "inline" to the declaration of the destructor.
Compiler versions used:

  gcc version 4.3.3 (Debian 4.3.3-14) 
  gcc version 4.4.0 (Debian 4.4.0-11) 
  gcc version 4.5.0 20090620 (experimental) [trunk revision 148747] (Debian 20090620-1) 

on amd64.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Attachment: signature.asc
Description: Digital signature


Reply to: