🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Robert J.C. Kyanko Fri, 07 Aug 1992 00:23
Internal compiler error with g++ 2.2.2
#308
Author: Robert J.C. Kyanko
Date: Fri, 07 Aug 1992 00:23
33 lines
1358 bytes
I have a small piece of code when compiled with g++, version 2.2.2, that will
cause the compiler to say "Internal compiler error: program cc1plus got fatal
signal 6".  Gcc was compiled for target "sparc-sun-sunos4.1" and run on a
Sun SparcSystem 300.  I've got the code down to a bare minimum; eliminating
almost anything causes this error to go away.  The code is as follows:

	char *chs;
	int t_value;
	char line[200];
	char *lptr;

	static int getch(void);

	static void getnumber(int ch)
	{
		while ((ch = getch()) != 0 && (chs+1)[ch]) {
			t_value = t_value * 10 + ch - '0';
		}
	}


	void parse_error()
	{
		char buf[200], *src, *dst;

		for (src = line, dst = buf, src < lptr; ++src)
			*dst++ = (*src == '\t' ? '\t' : ' ');
	}


It's not much of a program, but it definately does cause g++ to abort.  The
same code compiled with gcc does not cause this compiler error, just an error
about the static getch() not defined anywhere in the source.  
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