🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by David Hinman Thu, 19 Oct 1989 21:24
g++ 1.35.0, sun3-os4; seg fault while compiling broken program
#519
Author: David Hinman
Date: Thu, 19 Oct 1989 21:24
45 lines
1803 bytes
When I compile the following program, which erroneously declares a static
member that is an array of objects that need constructors, the compiler gets
a segmentation fault.

>>> The code:

class Blimpht
{
public:
	virtual void trick1();
	};

class Test
{
public:
	static Blimpht fred[17]; // this is an error, since
				 // fred has a constructor because
				 // of virtual function trick1()
	};

>>> The compilation:

CSH curly hinman> g++ -v -c junk.C
g++ version 1.35.0
 /usr/public/lib/gnucompilers/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ 
-D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ 
-D__HAVE_68881__ -Dmc68020 junk.C /tmp/cca13974.cpp
GNU CPP version 1.35
 /usr/public/lib/gnucompilers/gcc-cc1plus /tmp/cca13974.cpp -quiet -dumpbase 
junk.C -noreg -version -o /tmp/cca13974.s
GNU C++ version 1.35.0 (68k, MIT syntax) compiled by GNU C version 1.35.
junk.C:13: Segmentation violation
g++: Program cc1plus got fatal signal 11.
CSH curly hinman> 

>>> Words of appreciation:

We're very happy with the quality of g++ here; thanks for making it
available to us!

Dave Hinman                         
Samsung Software America           (508) 685-7200 ext. 124
One Corporate Drive                hinman@ginosko.samsung.com
Andover, MA 01810                  uunet!ginosko!hinman
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads