🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by "Douglas C. Schmidt" Tue, 22 Nov 1988 06:31
g++ allows definition of base destructor in derived class
#1536
Author: "Douglas C. Schmidt"
Date: Tue, 22 Nov 1988 06:31
28 lines
1241 bytes
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.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads