[gnu.g++.bug] g++ allows definition of base destructor in derived class

schmidt%glacier.ics.uci.edu@ORION.CF.UCI.EDU ("Douglas C. Schmidt") (11/22/88)

Hi,

   I believe the following is quite erroneous, however, g++ 1.27 accepts
it without complaint:

----------------------------------------
class foo {
public:
   foo () {}   
};

class bar : foo {
   bar() {}
  ~foo() {} // yow, let's define foo's destructor in derived class bar!
};

main () { }
----------------------------------------

CC 1.2.1 obviously complains that ~foo declared in bar is an error!

Doug
----------------------------------------
schmidt@bonnie.ics.uci.edu (ARPA) |   Per me si va nella cita dolente.
                                  |   Per me si va nell' etterno dolore.
                                  |   Per me si va tra la perduta gente.
                                  |   Lasciate ogni speranza voi ch' entrate.