This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Instantiation of pure virtual class
- To: dvv at egcs dot dvv dot org
- Subject: Re: Instantiation of pure virtual class
- From: Alexandre Oliva <oliva at lsd dot ic dot unicamp dot br>
- Date: 26 Feb 2000 16:14:31 -0300
- Cc: Roger Leblanc <rleblanc at gdc dot ca>, egcs-bugs at egcs dot cygnus dot com, Sunil Rottoo <sunil at gdc dot ca>
- References: <38B6B618.8FA080DC@gdc.ca> <38B6EC6C.5C338A97@dvv.org>
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