Path: utzoo!telly!ddsw1!mcdchg!rutgers!tut.cis.ohio-state.edu!ORION.CF.UCI.EDU!schmidt%crimee.ics.uci.edu From: schmidt%crimee.ics.uci.edu@ORION.CF.UCI.EDU ("Douglas C. Schmidt") Newsgroups: gnu.g++.bug Subject: several problems with g++ 1.27 on sparc Message-ID: <8810041348.aa24159@PARIS.ICS.UCI.EDU> Date: 4 Oct 88 20:48:05 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 50 Hi, The following program causes several problems for g++ 1.27. 1. When compiled with the -gg and -O flags it gets a fatal signal. 2. When compiled ``normally,'' (i.e., would -gg) the resulting code gets a segmentation fault when executed. However, it works fine with cfront 1.2.1. Also, there seems to be a problem with the debugger (gdb+ 2.8) running under the Sun OS 4.0. Since ld++ doesn't recognize -Bstatic I am generally unable to debug g++ code under 4.0. Is there a workaround for this? Here's the code: ---------------------------------------- #include class foo { public: char buf[100]; foo() { strcpy(buf,"I am the default base"); } virtual ~foo() { cout << buf << "\n"; } }; class bar : foo { public: bar() { strcpy(foo::buf,"I am derived constructor"); } ~bar() { cout << "I am the derived destructor!" << "\n"; } }; main() { foo foobar; bar Foobar; } ---------------------------------------- thanks, Doug