Deutsch   English   Français   Italiano  
<87zfoi2d5c.fsf@nosuchdomain.example.com>

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

Path: ...!2.eu.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: Top 10 most common hard skills listed on resumes...
Date: Sun, 08 Sep 2024 11:50:23 -0700
Organization: None to speak of
Lines: 37
Message-ID: <87zfoi2d5c.fsf@nosuchdomain.example.com>
References: <vab101$3er$1@reader1.panix.com> <valrj7$367a8$2@dont-email.me>
	<87mskwy9t1.fsf@bsb.me.uk> <vanq4h$3iieb$1@dont-email.me>
	<875xrkxlgo.fsf@bsb.me.uk> <vapitn$3u1ub$1@dont-email.me>
	<87o75bwlp8.fsf@bsb.me.uk> <vaps06$3vg8l$1@dont-email.me>
	<871q27weeh.fsf@bsb.me.uk> <20240829083200.195@kylheku.com>
	<87v7zjuyd8.fsf@bsb.me.uk> <20240829084851.962@kylheku.com>
	<87mskvuxe9.fsf@bsb.me.uk> <vaq9tu$1te8$1@dont-email.me>
	<vbci8r$1c9e8$1@paganini.bofh.team> <vbcs65$eabn$1@dont-email.me>
	<vbekut$1kd24$1@paganini.bofh.team> <vbepcb$q6p2$1@dont-email.me>
	<vbj6ii$1q6mh$1@dont-email.me> <vbjtmi$1sqao$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Sun, 08 Sep 2024 20:50:23 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="cc0e421bd7ae7ddfd4a32af9b891a7a5";
	logging-data="2131817"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/2izQLZ8FvKD29+DCw9w1d"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:KUdaTUoiGX0fAHr11rZqyp6MIu4=
	sha1:7yoi98Xs9H3x1lYlnXpKSfMBXjw=
Bytes: 2919

Bart <bc@freeuk.com> writes:
[...]
> Take this C:
>
>     int A, B;
>
>     A = B;
>
> There are two types associated with the LHS: 'int*' which is the type
> the name A (its address), and 'int' which is the type of A's value.

No, there is no int* associated with the LHS.  The LHS is an lvalue
of type int.

An lvalue is an expression that (potentially) *designates* an object.
In this case, the lvalue `A` designates the int object whose name is
"A".  Designating an object is not defined in terms of the object's
address or constructing a pointer to it.

Nothing in the C syntax or semantics of this assignment expression
refers to the address of A, or to anything of type int*.
(The generated code may or may not compute the address of A.)

C *could* have defined assignment and similar operations in terms of the
address of the target, and perhaps some other languages might do so.
But it doesn't.

And if it had, then assignment to bit fields would have had to be
described as a special case.  They aren't.  If bf is the name of a bit
field, then obj.bf is an lvalue designating a bit field object (which
has no address), and `obj.bf = 42` assigns a value to that object.

[...]

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */