This is the mail archive of the gcc-bugs@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]

Re: Instantiation of pure virtual class


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


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