Instantiation of pure virtual class
Alexandre Oliva
oliva@lsd.ic.unicamp.br
Sat Feb 26 11:14:00 GMT 2000
On Feb 25, 2000, Dima Volodin <dvv@dvv.org> wrote:
> A simpler example that demonstrates the problem:
[snip]
> With -DTEMPLATE, 2.95.2 compiles it without even a warning.
But the latest snapshot rightfully complains:
/home/lsd/oliva/t.cc: In function `void g (C &)':
/home/lsd/oliva/t.cc:19: cannot allocate an object of type `C'
/home/lsd/oliva/t.cc:19: since the following virtual functions are
/home/lsd/oliva/t.cc:19: abstract:
/home/lsd/oliva/t.cc:3: void C::v ()
It seems that the error message could be improved, so as to point to
the erroneous function declaration and the template instantiation, but
it's technically correct.
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/ Enjoy Guaraná
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me
More information about the Gcc-bugs
mailing list