🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

g++ 1.35.0, sun3-os4; signal 11 while compiling

#301
From: David Hinman
Date: Thu, 27 Jul 1989 21:47
47 lines
1917 bytes
When I compile the following test program, I get a segmentation violation.
When the structure declaration is removed from the class, the problem goes away.

>>> The code:
/*  g++ 1.35.0, sun3-os4; signal 11 while compiling */
class ObjectTable 
	{
	
private:

	typedef struct ote_struct
		{
		int x;
		int y;
		} ObjectTableElement;

	ObjectTableElement ote;

	ObjectTableElement* index() { return &ote; }

public:
	void     setNBytes();
	};

>>> The compiler messages:
imposter hinman> g++ -v -g -c test23.C
g++ version 1.35.0
 /usr/local/pkg/gnu/compilers/sun3new/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__
-D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE
_68881__ -Dmc68020 test23.C /tmp/cca18439.cpp
GNU CPP version 1.35
 /usr/local/pkg/gnu/compilers/sun3new/gcc-cc1plus /tmp/cca18439.cpp -quiet -dump
base test23.C -noreg -version -G -o /tmp/cca18439.s
GNU C++ version 1.35.0 (68k, MIT syntax) compiled by GNU C version 1.35.
In method struct ote_struct *ObjectTable::index ():
test23.C:14: Segmentation violation
g++: Program cc1plus got fatal signal 11.
imposter hinman>

>>> The pat on the back:
I'm a happy user of FSF products; thanks for sharing your software!

Dave Hinman                         
Samsung Software America           (508) 685-7200 ext. 124
One Corporate Drive                hinman@ginosko.samsung.com
Andover, MA 01810                  uunet!ginosko!hinman
Technical Details
Message-ID: <8907272147.AA18508@imposter>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!IMPOSTER.SAMSUNG.COM!hinman

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!IMPOSTER.SAMSUNG.COM!hinman
From: hinman@IMPOSTER.SAMSUNG.COM (David Hinman)
Newsgroups: gnu.g++.bug
Subject: g++ 1.35.0, sun3-os4; signal 11 while compiling
Message-ID: <8907272147.AA18508@imposter>
Date: 27 Jul 89 21:47:14 GMT
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: <hinman@imposter.samsung.com>
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 47