This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Is this a bug for gcc (2.95 and 3.1)?
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Bernard Dautrevaux <Dautrevaux at microprocess dot com>
- Cc: "'Mitchell Maggie'" <maggie_shh at hotmail dot com>, gcc at gcc dot gnu dot org
- Date: 28 May 2002 00:40:15 -0300
- Subject: Re: Is this a bug for gcc (2.95 and 3.1)?
- Organization: GCC Team, Red Hat
- References: <17B78BDF120BD411B70100500422FC6309E575@IIS000>
On May 27, 2002, Bernard Dautrevaux <Dautrevaux@microprocess.com> wrote:
> However I'm a bit puzzled by your "if it's actually used" above. As class A
> was abstract it can only be used through a derived class, but overriding of
> destructors, even if possible, is a bit special as the overriding destructor
> always contains a call to th ebase class destructor.
Which would qualify as a use, in case the destructor of the derived class
is defined (implicitly or explicitly) in that translation unit.
> So if class A is more than just a test case to the compiler (that
> is, if it is meant to be used) then the pure virtual destructor must
> always be defined.
Yup.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer