Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!caen!uwm.edu!ogicse!orstcs!fog.CS.ORST.EDU!budd From: budd@fog.CS.ORST.EDU (Tim Budd) Newsgroups: comp.lang.c++ Subject: Re: private inheritance in G++ 1.39 Message-ID: <1991Jun29.173818.8804@lynx.CS.ORST.EDU> Date: 29 Jun 91 17:38:18 GMT References: <1991Jun27.163527.25117@lynx.CS.ORST.EDU> Sender: @lynx.CS.ORST.EDU Organization: Computer Science Department, Oregon State Univ. Lines: 36 Nntp-Posting-Host: fog.cs.orst.edu > > The default destructor generated for the derived class calls >the base class destructor, and it is public. So to accomplish what you >want, just remove the One::~One; line. > > This from ARM 12.4, pp 276 and 277 (also the sections named above). >-- tesla 1% g++ -v g++ version 1.39.1 (based on GCC 1.39) tesla 2% g++ private.cc private.cc: In function int main (): private.cc:17: type `Two' is derived from private `One' private.cc:18: type `Three' is derived from private `One' tesla 3% cat private.cc # include class One { public: ~One() {} }; class Two : private One { public: }; class Three : public Two { public: }; main() { Two x2; Three x3; } So am I to assume you are under the impression that g++ 1.39 is broken in this regard?