This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Calling a pure virtual function
- From: Lion Vollnhals <lion dot vollnhals at web dot de>
- To: a dot nielsen at shikadi dot net, gcc at gcc dot gnu dot org
- Date: Sat, 09 Jul 2005 19:47:22 +0200
- Subject: Re: Calling a pure virtual function
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> It seems like GCC initially allows it as it starts to compile okay, but
> then I get an undefined reference error from the linker (because it
> seems to be actually calling Base::number(), which obviously won't work
> as it's a pure virtual function.)
it works for me if number() is not called in the Base constructor but in another
non-virtual Base function.
- --
Lion Vollnhals
free time linux enthusiast
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFC0A2qM/kSIby6NMURAgGEAJ9sRFyaCSZEcO89oAb6DDWzG3iSYQCcCyyl
HviQIF52XneHS58FL1S2oi4=
=mNKz
-----END PGP SIGNATURE-----