This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Bug report - Pure non-virtual template declarations
- To: Philippe Bouchard <boucp00 at DMI dot USherb dot CA>
- Subject: Re: Bug report - Pure non-virtual template declarations
- From: Alexandre Oliva <oliva at lsd dot ic dot unicamp dot br>
- Date: 11 Nov 1999 12:24:45 -0200
- Cc: "gcc-bugs at gcc dot gnu dot org" <gcc-bugs at gcc dot gnu dot org>
- References: <382A0BED.CD3B29E2@dmi.usherb.ca>
On Nov 10, 1999, Philippe Bouchard <boucp00@DMI.USherb.CA> wrote:
> The compiler does not detect the following error:
The real error is to accept this declaration. Member function
templates shall not be virtual [temp.mem]/3 (thus they can't be pure
virtual either), and specializations of member function templates do
not override virtual functions from base classes [temp.mem]/4. I'm
adding the following testcase to the testsuite:
// Build don't link:
// Copyright (C) 1999 Free Software Foundation
// by Alexandre Oliva <oliva@lsd.ic.unicamp.br>
// based on bug report by Philippe Bouchard <boucp00@DMI.USherb.CA>
struct foo {
template <class>
void bar() = 0; // ERROR - invalid initializer - XFAIL *-*-*
};
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them