Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site watdaisy.UUCP
Path: utzoo!watmath!watdaisy!ndiamond
From: ndiamond@watdaisy.UUCP (Norman Diamond)
Newsgroups: net.lang.c
Subject: Re: String help!
Message-ID: <7027@watdaisy.UUCP>
Date: Sun, 3-Mar-85 16:25:11 EST
Article-I.D.: watdaisy.7027
Posted: Sun Mar  3 16:25:11 1985
Date-Received: Mon, 4-Mar-85 06:36:02 EST
References: <8257@watarts.UUCP> <929@ukma.UUCP> <437@ark.UUCP> <194@rtech.ARPA>
Organization: U of Waterloo, Ontario
Lines: 29

> > You are allowed to say:
> > 
> > main()
> > {
> > 	char *ptr;
> > 	char *foo();
> > 
> > 	ptr = foo();
> > 	strcpy( ptr, "barfoo" );
> > 	.....
> > }
> > -- Michiel Huisjes.
> 
> In DEC C, string constants are read-only.  They are in a special, write-
> protected psect.  If you try to do something like the above, you will
> get a run-time error.  --  Jeff Lichtman

What does the standard say about this?  Can an implementation legally prevent
a C program from modifying storage accessed by a valid pointer?

-- 

   Norman Diamond

UUCP:  {decvax|utzoo|ihnp4|allegra}!watmath!watdaisy!ndiamond
CSNET: ndiamond%watdaisy@waterloo.csnet
ARPA:  ndiamond%watdaisy%waterloo.csnet@csnet-relay.arpa

"Opinions are those of the keyboard, and do not reflect on me or higher-ups."