Path: utzoo!telly!ddsw1!mcdchg!rutgers!tut.cis.ohio-state.edu!ORION.CF.UCI.EDU!schmidt%glacier.ics.uci.edu From: schmidt%glacier.ics.uci.edu@ORION.CF.UCI.EDU ("Douglas C. Schmidt") Newsgroups: gnu.g++.bug Subject: g++ allows definition of base destructor in derived class Message-ID: <8811212231.aa12010@PARIS.ICS.UCI.EDU> Date: 22 Nov 88 06:31:52 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 28 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.