🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: g++ core dump from improper use of extern "C"

#2135
From: Piercarlo Grandi
Date: Sat, 06 Jan 1990 19:55
23 lines
1456 bytes
In article <9001051018.AA05287@multics.MIT.EDU> Raeburn@ATHENA.MIT.EDU (Ken Raeburn) writes:
    
    (version 1.36.1, vax)
    
    Source file:
    
    	extern "C" {
    	    extern void foo (struct frob *);
    	};
    
    	struct frob {
    	    int a, b;
    	};

and it chokes.... Too bad :->. In any case, you *should not* put a semicolon
at the end of an extern "C" block. This is also the likely reason of the
core dump, because using 'struct some *' before having seen 'struct some {
....' is legal and without problem in both C and C++, or else mutually
"recursive" data structures would not be possible.
-- 
Piercarlo "Peter" Grandi           | ARPA: pcg%cs.aber.ac.uk@nsfnet-relay.ac.uk
Dept of CS, UCW Aberystwyth        | UUCP: ...!mcvax!ukc!aber-cs!pcg
Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk
Technical Details
Message-ID: <1573@aber-cs.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!apple!snorkelwacker!bloom-beacon!eru!luth!sunic!tut!santra!mcsun!ukc!dcl-cs!aber-cs!pcg

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!apple!snorkelwacker!bloom-beacon!eru!luth!sunic!tut!santra!mcsun!ukc!dcl-cs!aber-cs!pcg
From: pcg@aber-cs.UUCP (Piercarlo Grandi)
Newsgroups: gnu.g++.bug
Subject: Re: g++ core dump from improper use of extern "C"
Summary: Extra semicolon...
Message-ID: <1573@aber-cs.UUCP>
Date: 6 Jan 90 19:55:26 GMT
Reply-To: pcg@cs.aber.ac.uk (Piercarlo Grandi)
Distribution: gnu
Organization: Dept of CS, UCW Aberystwyth
 (Disclaimer: my statements are purely personal)
Lines: 23