🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Arthur David Olson Sat, 11 Apr 1992 21:06
Gnu GCC 2.1 can dump core if -Wtraditional is used (with fix)
#366
Author: Arthur David Olson
Date: Sat, 11 Apr 1992 21:06
53 lines
2249 bytes
Index:	gcc-2.1/c-lex.c

(We're running SunOS 4.1.1 on a Sun 4/75 and a Sun 3/280.)

Description:
	Gnu GCC 2.1 can dump core if -Wtraditional is used.

Repeat-By:
	Script started on Sat Apr 11 17:02:31 1992
	bossie.nci.nih.gov$ cat try.c
	strtoul(base) 
	{
	  unsigned long cutoff;

	  cutoff = 4294967295U / (unsigned long) base;
	}
	bossie.nci.nih.gov$ gcc -v -Wtraditional try.c
	Reading specs from /usr/local/lib/gcc-lib/sun4/2.1/specs
	gcc version 2.1
	 /usr/local/lib/gcc-lib/sun4/2.1/cpp -lang-c -v -undef -D__GNUC__=2 -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix -Wtraditional try.c /usr/tmp/cca08972.i
	GNU CPP version 2.1 (sparc)
	 /usr/local/lib/gcc-lib/sun4/2.1/cc1 /usr/tmp/cca08972.i -quiet -dumpbase try.c -Wtraditional -version -o /usr/tmp/cca08972.s
	GNU C version 2.1 (sparc) compiled by GNU C version 2.1.
	/usr/local/bin/gcc: Internal compiler error: program cc1 got fatal signal 6
	bossie.nci.nih.gov$ exit

	script done on Sat Apr 11 17:02:59 1992

Fix:
	SCCS/s.c-lex.c: 1.1 vs. 1.2
	*** 1.1/c-lex.c	Sat Apr 11 17:04:05 1992
	--- 1.2/c-lex.c	Sat Apr 11 17:04:06 1992
	***************
	*** 1613,1619 ****
			else if (TREE_UNSIGNED (traditional_type)
				 != TREE_UNSIGNED (ansi_type))
			  warning ("integer constant is unsigned in ANSI C, signed with -traditional");
	! 		else abort ();
		      }
	  #endif
	  
	--- 1613,1620 ----
			else if (TREE_UNSIGNED (traditional_type)
				 != TREE_UNSIGNED (ansi_type))
			  warning ("integer constant is unsigned in ANSI C, signed with -traditional");
	! 		else
	! 		  warning ("width of integer constant may change on other systems with -traditional");
		      }
	  #endif
	  
-- 
		Arthur David Olson	ado@elsie.nci.nih.gov
		ADO and Elsie are Ampex and Borden trademarks
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