Deutsch   English   Français   Italiano  
<861psz3fea.fsf@linuxsc.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.misty.com!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups: comp.lang.c
Subject: Re: Regarding assignment to struct
Date: Wed, 07 May 2025 21:17:17 -0700
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <861psz3fea.fsf@linuxsc.com>
References: <vv338b$16oam$1@dont-email.me> <vv4j9p$33vhj$1@dont-email.me> <86plgo7ahu.fsf@linuxsc.com> <vv9hu7$3nomg$1@dont-email.me> <87o6w7h2wn.fsf@nosuchdomain.example.com> <868qnb5gg6.fsf@linuxsc.com> <87bjs6hjpo.fsf@nosuchdomain.example.com> <vvdmjb$3ilpe$1@dont-email.me> <87frhhfq25.fsf@nosuchdomain.example.com> <vvgb5j$3ilpe$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Thu, 08 May 2025 06:17:19 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="8ae053696287f1619c3fbdcfaf84f4fc";
	logging-data="1628733"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18CUvgMJUZmD6nkSTpg67FQ+afWoc1IsMM="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:ew1B4+WZOINw8RJjWenU6ZQRelI=
	sha1:TurZeiNrL0JFtYb6qSRdCBjdRCU=
Bytes: 2364

Nick Bowler <nbowler@draconx.ca> writes:

> On Tue, 06 May 2025 13:21:38 -0700, Keith Thompson wrote:
>
>> Nick Bowler <nbowler@draconx.ca> writes:
>>
>>> The rule about conversions from arrays to pointers is different
>>> in C99 (n1124 6.3.2.1, third paragraph) compared to C89.  In
>>> particular, "an lvalue that has type ``array of type'' ..." was
>>> changed to "an expression that has type ``array of type'' ...".
>
> [...]
>
>> The change from "lvalue" to "expression" was made in C99.  I
>> wonder why that was done.
>
> It's not mentioned in the rationale, so we can only guess.  [...]

To me it seems obvious.  The change in C99 was meant to allow
access to an array inside a non-lvalue struct.  When C99 was
done the committee didn't realize all the ramifications of
accessing non-value structs (which apparently has problems
even for scalar members, not just array members).  Later, when
they did realize the resulting problems, they fixed things up
in C11.

See also n1253.htm, by Clark Nelson.