🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #687

Re: gcc 1.35 pointer bug

#687
From: Dave Hanson
Date: Thu, 05 Oct 1989 20:48
15 lines
1103 bytes
In article <8910042003.AA19615@uhura.cc.rochester.edu> msir_ltd@UHURA.CC.ROCHESTER.EDU (Mark Sirota) writes:
	This has already been reported to Joy Kendall and may have already been
	reported through other channels, since we discovered this a few days ago.
	Anyway, we are running gcc-1.35 on a Sun3 with an fpa, SunOS 4.0.3.
	
	The following program causes a segmentation fault:
	main() {
		char	*s = "foo";
		*s = 'f';
	}
	This one seems pretty significant.  I have a hard time the compiler managed to
	compile itself, and actually runs...

and it should fault; the program attempts to change a constant.
it worked in old C, but not in ANSI C...
Technical Details
Message-ID: <19949@princeton.Princeton.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!njin!princeton!notecnirp!drh

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!njin!princeton!notecnirp!drh
From: drh@notecnirp.Princeton.EDU (Dave Hanson)
Newsgroups: gnu.gcc.bug
Subject: Re: gcc 1.35 pointer bug
Message-ID: <19949@princeton.Princeton.EDU>
Date: 5 Oct 89 20:48:12 GMT
Sender: news@princeton.Princeton.EDU
Reply-To: drh@notecnirp.UUCP (Dave Hanson)
Distribution: gnu
Organization: Dept. of Computer Science, Princeton University
Lines: 15