🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

SEGV in late extern "C"

#559
From: ojr
Date: Mon, 30 Oct 1989 10:04
43 lines
1426 bytes
The following program causes a segment violation both on sparcstation
and sun3.

Our configuration:
sun-os4
sun3/sun4
g++ version 1.36- last changed Wed Oct 11 1989

----------------------------------------
class A
{
public:
    A() {printf("Hello world\n");}
};

extern "C"
{
    void printf(char*,...);
};

A a;
-----------------------------------------

g++ -v
gcc version 1.36.0- (based on GCC 1.36)
g++ -c bug2.cc
g++ -c bug2.cc
bug2.cc: In method A::A ():
bug2.cc:19: warning: implicit declaration of function `printf'
bug2.cc: At top level:
bug2.cc:24: warning: `printf' was previously implicitly declared to return `int'
bug2.cc: In function void _GLOBAL_$I$bug2_cc ():
bug2.cc:19: warning: bug2.cc:27: Segmentation violation
g++: Program cc1plus got fatal signal 11.


Ornulf Jan Rodseth M.Sc.			Telephone
SINTEF Dep. of Automatic Control		(+47 7) 594351 Direct
N-7034 TRONDHEIM				(+47 7) 594375 Switchboard
NORWAY						(+47 7) 594399 Fax

ojr%regtek.unit.uninett@tor.nta.no (EAN)	ojr@itk.unit.no (ARPA)
Technical Details
Message-ID: <8910301006.AA11248@inge.itk.unit.no>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!samsung!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!itk.unit.no!ojr

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!samsung!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!itk.unit.no!ojr
From: ojr@itk.unit.no
Newsgroups: gnu.g++.bug
Subject: SEGV in late extern "C"
Message-ID: <8910301006.AA11248@inge.itk.unit.no>
Date: 30 Oct 89 10:04:54 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 43