Path: utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!MCC.COM!rfg From: rfg@MCC.COM (Ron Guilmette) Newsgroups: gnu.g++.bug Subject: BUG in G++ 1.35.0 (abort) (b075) Message-ID: <8906090023.AA12261@pink.aca.mcc.com> Date: 9 Jun 89 00:23:45 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 29 The following code causes G++ 1.35.0 to abort. ----------------------------------------------------------------- // Check that it is illegal to declare a member function which // returns a type which has not yet been declared (even // incompletely). // // This code causes G++ 1.35.0 to abort. struct base { int data_member; struct bogus_type member (int i) { // ERROR return 0; } }; --------------------------------------------------------------- g++-1.35.0.0 -g -Wall -Wwrite-strings -v -S b075.C g++ version 1.35.0 /usr/local/src/lib/sun3/g++-1.35.0.0/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -Wall -D__HAVE_68881__ -Dmc68020 b075.C /tmp/cca12250.cpp GNU CPP version 1.35 /usr/local/src/lib/sun3/g++-1.35.0.0/gcc-cc1plus /tmp/cca12250.cpp -quiet -dumpbase b075.C -Wall -Wwrite-strings -noreg -version -G -o b075.s GNU C++ version 1.35.0 (68k, MIT syntax) compiled by GNU C version 1.35. In method struct bogus_type base::member (int): b075.C:10: return-type `bogus_type' is an incomplete type b075.C:10: conflicting types for `struct bogus_type base::member (int)' In method struct bogus_type base::member (int): b075.C:11: invalid use of undefined type `struct bogus_type' g++-1.35.0.0: Program cc1plus got fatal signal 6.