Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <87bk0vjbvz.fsf@bsb.me.uk>
Deutsch   English   Français   Italiano  
<87bk0vjbvz.fsf@bsb.me.uk>

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

Path: news.eternal-september.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Ben Bacarisse <ben@bsb.me.uk>
Newsgroups: comp.lang.c
Subject: Re: Top 10 most common hard skills listed on resumes...
Date: Wed, 11 Sep 2024 01:02:24 +0100
Organization: A noiseless patient Spider
Lines: 85
Message-ID: <87bk0vjbvz.fsf@bsb.me.uk>
References: <vab101$3er$1@reader1.panix.com> <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>
	<20240908115827.00007521@yahoo.com> <vbju6l$1sqao$2@dont-email.me>
	<87zfoikve1.fsf@bsb.me.uk> <vbkka9$201ms$2@dont-email.me>
	<vbnv43$2igdn$1@dont-email.me> <87zfofk32t.fsf@bsb.me.uk>
	<vbptr4$31s4d$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 11 Sep 2024 02:02:25 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="a88e9bf9a1721beec55f209e58e7c967";
	logging-data="3387132"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+GeN+AuaPJ4e5h4gZ8Dip2a23gzJK4Urs="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:BgeG4aiheANsQWw90qbOFUf+jHA=
	sha1:y8NnxuR+NE+LUWi+PX3eBXDPUzw=
X-BSB-Auth: 1.86648ba455b503f7209b.20240911010224BST.87bk0vjbvz.fsf@bsb.me.uk

Bart <bc@freeuk.com> writes:

> On 10/09/2024 15:15, Ben Bacarisse wrote:
>> Bart <bc@freeuk.com> writes:
>> 
>>> On 08/09/2024 17:44, Bart wrote:
>>>> On 08/09/2024 16:39, Ben Bacarisse wrote:
>>>>> Bart <bc@freeuk.com> writes:
>>>>>
>>>>>> In language like C, the LHS of an assignment is one of four categories:
>>>>>>
>>>>>>     A = Y;         // name
>>>>>>     *X = Y;        // pointer
>>>>>>     X[i] = Y;      // index
>>>>>>     X.m = Y;       // member select
>>>>>
>>>>> I can think of three others.  There may be more.
>>>> OK, so what are they?
>>>
>>> TM:
>>>> Yes, very good.  I count four or five, depending on what
>>> differences count as different.
>>>
>>> I guess nobody is going to say what those extra categories are, are
>>> they?
>> Sorry, I was busy.  I see KT as given a good summary (though I was not
>> counting forms in parentheses).
>> 
>>> It's bad form to call somebody out on something but then refuse to tell
>>> them exactly what they've got wrong or have missed out.
>>>
>>> 3, 4, or maybe 5 mysterious categories of LHS assignment terms that I have
>>> never been encountered in a million lines of C code I've processed, but
>>> nobody is willing to say what they are?
>>>
>>> I sense a wind-up.
>> You have implemented a C compiler.  The wind-up I sensed was your giving
>> out misinformation, but I'll just have to take your word for it that
>> you've been arguing about assignments without know what constitutes an
>> lvalue expression.
>> But when I didn't answer soon enough, surely you could have just looked
>> in any good C reference to find all the expression forms that are
>> lvalues.
>> 
>>>>> I can think of at least one expression form for X that contradicts this
>>>>> claim.
>>>> Example?
>>>
>>> Nothing here either.
>> f().m where f returns a struct.
>
> f().m is allowed with mcc and tcc compilers (but it doesn't do anything
> useful). It's not classed as an lvalue by gcc.

gcc is correct.  It isn't a lvalue.

> By "the LHS of an assignment", and "X is a term of any complexity" I imply
> those X's forming valid LHS terms.
>
> An X used as X[i]=Y, *X=Y, or X.m=Y, or even any of the Y's, could be
> rejected for lots of reasons. That X isn't an array, pointer or struct for
> example.

Yes, and you'll notice I did not point that out.  There are cases when
X.m is not a lvalue even when X is an expression of the right type to
have a member m.

> (BTW I've now counted the different categories of my own languages are
> there are about 15 in all that can be used as assignment targets. A lot are
> just terms that can appear as rvalues, that can also appear as lvalues.
>
> For example a 'switch' statement, which standard C doesn't even allow as an
> rvalue.
>
> Sorry, did your remark above suggest I don't know what an lvalue is?

That seemed like the obvious explanation for the incorrect information
you gave.  Did you post it /knowing/ what other kinds of things are
lvalues in C just to confuse people?

> Maybe
> it's a miracle all this stuff works then!)

-- 
Ben.