🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #52

Re: on "use", and the lvalue-ness of string literals

#52
From: Chris Torek
Date: Mon, 02 Nov 1992 18:52
16 lines
1116 bytes
In article <1992Nov2.162310.10094@ichips.intel.com> bhoughto@sedona.intel.com
(Blair P. Houghton) writes:
>	"A string literal is a primary expression.
>	 It is an lvalue..."
>			 (ANSI X3.159-1989, sec. 3.3.1
>			 Primary Expressions, p. 40, l. 13)
>It's an LVALUE.  This means that,
>	"foo" = "bar";
>is legal.  Right?

No, it is a `non-modifiable lvalue', just like an array---and in fact,
a string literal *is* an array (type `array N of char', even though the
actual char's may themselves be const).
-- 
In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 510 486 5427)
Berkeley, CA		Domain:	torek@ee.lbl.gov
Technical Details
Message-ID: <27143@dog.ee.lbl.gov>
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!agate!dog.ee.lbl.gov!horse.ee.lbl.gov!torek
References: <1992Nov2.162310.10094@ichips.intel.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!agate!dog.ee.lbl.gov!horse.ee.lbl.gov!torek
From: torek@horse.ee.lbl.gov (Chris Torek)
Newsgroups: comp.std.c
Subject: Re: on "use", and the lvalue-ness of string literals
Date: 2 Nov 1992 18:52:21 GMT
Organization: Lawrence Berkeley Laboratory, Berkeley
Lines: 16
Message-ID: <27143@dog.ee.lbl.gov>
References: <1992Nov2.162310.10094@ichips.intel.com>
Reply-To: torek@horse.ee.lbl.gov (Chris Torek)
NNTP-Posting-Host: 128.3.112.15