🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #781

g++ 2.2.2 bug with extern "C" friends

#781
From: Steve Rumsby
Date: Tue, 11 Aug 1992 16:57
25 lines
1498 bytes
Classes with extern "C" friend functions seem to give cc1plus gastric distress.
This happens on Sparc (SunOS 4.1.1), Sun 3 (SunOS 4.1.1), and SGI MIPS
(Irix 4.0.1) boxes, so I guess it is pretty fundamental! Any suggestions?

Thanks,
Steve.

$ cat kb.c
extern "C" int bar();

struct foo {
	friend int bar();
};
$ g++ -v kb.c
Reading specs from /gnu/lib/gcc-lib/sparc-sunos4/2.2.2/specs
gcc version 2.2.2
 /gnu/lib/gcc-lib/sparc-sunos4/2.2.2/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix kb.c /usr/tmp/cca00897.i
GNU CPP version 2.2.2 (sparc)
 /gnu/lib/gcc-lib/sparc-sunos4/2.2.2/cc1plus /usr/tmp/cca00897.i -quiet -dumpbase kb.cc -version -o /usr/tmp/cca00897.s
GNU C++ version 2.2.2 (sparc) compiled by GNU C version 2.2.2.
/gnu/bin/gcc: Internal compiler error: program cc1plus got fatal signal 11

--
UUCP:	 ...!uknet!warwick!steve	Internet: steve@maths.warwick.ac.uk
JANET:	 steve@uk.ac.warwick.maths	PHONE:	 +44 203 524657
Technical Details
Message-ID: <18932.199208111457@amazon.maths.warwick.ac.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!maths.warwick.ac.UK!steve

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!maths.warwick.ac.UK!steve
From: steve@maths.warwick.ac.UK (Steve Rumsby)
Subject: g++ 2.2.2 bug with extern "C" friends
Message-ID: <18932.199208111457@amazon.maths.warwick.ac.uk>
Sender: gnulists@ai.mit.edu
Organization: Maths Institute, Warwick University, Coventry, UK.
Distribution: gnu
Date: Tue, 11 Aug 1992 16:57:51 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 26