Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Difference between these pointer syntaxes Date: Sat, 27 Aug 2016 14:18:12 -0700 Organization: None to speak of Lines: 26 Message-ID: References: <4628cd2d-9333-4be6-943a-eb593c5c4c12@googlegroups.com> <878tvigdzw.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="19795"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18GJzo5pqsFiYfuYKz6/n1T" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:4BEwNlI3QQxVdiplKQUcS3lHdlY= sha1:Mj5K1gbbtRl5Six5R6U/Um6cUB8= Xref: csiph.com comp.lang.c:92821 Ben Bacarisse writes: > Keith Thompson writes: > >> In fact *all* expressions of array type are lvalues (I'm not quite >> 100% certain of that). > > I can't find any text that tells me that "abc" is an lvalue expression. N1570 6.5.1 (Primary expressions), paragraph 4: A string literal is a primary expression. It is an lvalue with type as detailed in 6.4.5. What's interesting, though, is that 6.4.5 (String literals) describes in great detail the array object associated with a string literal, but it never gets around to saying that the string literal refers to the array object. 6.5.1 specifies its types, but not its value. I suppose the authors thought it was sufficiently obvious. [...] -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"