[Bug c++/15505] pure virtual destructor not overloaded, but accepted

b dot perschbacher at att dot net gcc-bugzilla@gcc.gnu.org
Tue May 18 15:33:00 GMT 2004


------- Additional Comments From b dot perschbacher at att dot net  2004-05-17 22:25 -------
Forgot to mention the compile command is:
g++ bug.C

and here is the output from the compiler:
/tmp/cc56si4w.o(.gnu.linkonce.t._ZN3subD1Ev+0x16): In function `sub::~sub
[in-charge]()':
: undefined reference to `base::~base [not-in-charge]()'
/tmp/cc56si4w.o(.gnu.linkonce.t._ZN3subC1Ev+0x64): In function
`sub::sub[in-charge]()':
: undefined reference to `base::~base [not-in-charge]()'
/tmp/cc56si4w.o(.gnu.linkonce.t._ZN4sub2D1Ev+0x16): In function `sub2::~sub2
[in-charge]()':
: undefined reference to `base::~base [not-in-charge]()'
/tmp/cc56si4w.o(.gnu.linkonce.t._ZN4sub2C1Ev+0x72): In function
`sub2::sub2[in-charge]()':
: undefined reference to `base::~base [not-in-charge]()'
/tmp/cc56si4w.o(.gnu.linkonce.t._ZN3subD0Ev+0x16): In function `sub::~sub
[in-charge deleting]()':
: undefined reference to `base::~base [not-in-charge]()'
/tmp/cc56si4w.o(.gnu.linkonce.t._ZN4sub2D0Ev+0x16): more undefined references to
`base::~base [not-in-charge]()' follow
collect2: ld returned 1 exit status


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15505



More information about the Gcc-bugs mailing list