This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: Calling a pure virtual function


* 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).


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