Path: utzoo!yunexus!telly!ddsw1!mcdchg!rutgers!tut.cis.ohio-state.edu!ORION.CF.UCI.EDU!schmidt%blanche.ics.uci.edu From: schmidt%blanche.ics.uci.edu@ORION.CF.UCI.EDU ("Douglas C. Schmidt") Newsgroups: gnu.g++.bug Subject: g++ 1.27 allows invalid operation on derived classes Message-ID: <8811231627.aa15269@PARIS.ICS.UCI.EDU> Date: 24 Nov 88 00:27:24 GMT Article-I.D.: PARIS.8811231627.aa15269 Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 36 Hi, I believe the following is illegal in C++. The AT&T compiler complains that: ---------------------------------------- CC test.C: "test.C", line 14: error: foo::foo() is from a private base class ---------------------------------------- which makes sense. However, g++ 1.27 accepts this without complaint. Here's the code: ---------------------------------------- #include class foo { public: foo () { ; } }; class bar : foo { public: }; main () { bar b; } ---------------------------------------- thanks, Doug