Calling a pure virtual function

Florian Weimer fw@deneb.enyo.de
Sat Jul 9 13:12:00 GMT 2005


* Adam Nielsen:

> It still makes me wonder whether GCC is reporting the correct error for
> this mistake though, I would've expected a compiler error (something
> along the lines of 'you can't call a pure virtual function') rather than
> a linker error.  Especially as GCC should be able to tell at compile
> time the base constructor is calling a pure virtual function.  I guess
> it's treating the constructor like any other function, where this
> behaviour would be permitted.

I think C++ allows for a definition for a purely abstract function
(which would be called in this case).



More information about the Gcc mailing list