This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: Is this a bug for gcc (2.95 and 3.1)?


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


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