🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Ron Guilmette Fri, 21 Apr 1989 20:43
BUG(s) in G++ 1.34.1 and 1.35.0 (pre-release)
#1888
Author: Ron Guilmette
Date: Fri, 21 Apr 1989 20:43
42 lines
1778 bytes
The following code caused G++ 1.34.1 (Sun3) to go into an infinite loop.

This code now causes G++ 1.35.0 (pre-release) to SegFault.  The compilation
log is shown below the code.

------------------------------------------------------------------------
// Check that it is illegal to have more than one *definition*
// for a given function with a given formal parameter profile
// in any one scope.

overload function;

void function (int i, float f)
{
	f = i;
}

void function (int j, float g)		// ERROR - previous definition
{
	g = j;
}

class base {
public:
	int member (int i)
	{
		return i;
	};

	int member (int j)		// ERROR - previous definition
	{
		return j;
	};
};
------------------------------------------------------------------------
/usr/local/src/src/g++/build/sun3/1.35-.0-.0/g++ -B/usr/local/src/src/g++/build/sun3/1.35-.0-.0/ -Wall -Wwrite-strings -S -v b035.C
g++ version 1.35.0-
 /usr/local/src/src/g++/build/sun3/1.35-.0-.0/cpp -+ -v -undef -D__GNU__ -D__GNUG__ -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -Wall -D__HAVE_68881__ -Dmc68020 b035.C /tmp/cca14767.cpp
GNU CPP version 1.35.0-
 /usr/local/src/src/g++/build/sun3/1.35-.0-.0/c++ /tmp/cca14767.cpp -quiet -dumpbase b035.C -Wall -Wwrite-strings -noreg -version -o b035.s
/usr/local/src/src/g++/build/sun3/1.35-.0-.0/g++: Program c++ got fatal signal 11.
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