Article View: gnu.g++.bug
Article #2078BUG in G++ 1.35.0 (abort) (b075)
From: Ron Guilmette
Date: Fri, 09 Jun 1989 00:23
Date: Fri, 09 Jun 1989 00:23
29 lines
1692 bytes
1692 bytes
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.
Technical Details
Message-ID:
<8906090023.AA12261@pink.aca.mcc.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!MCC.COM!rfgShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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