🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #366

Gnu GCC 2.1 can dump core if -Wtraditional is used (with fix)

#366
From: 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
Technical Details
Message-ID: <9204112106.AA00495@elsie.nci.nih.gov>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!elsie.nci.nih.gov!ado

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!elsie.nci.nih.gov!ado
From: ado@elsie.nci.nih.gov (Arthur David Olson)
Subject: Gnu GCC 2.1 can dump core if -Wtraditional is used (with fix)
Message-ID: <9204112106.AA00495@elsie.nci.nih.gov>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Sat, 11 Apr 1992 21:06:18 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 54