Liste des Groupes | Revenir à cl c |
Bart <bc@freeuk.com> writes: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.
On 08/09/2024 17:44, Bart wrote:Sorry, I was busy. I see KT as given a good summary (though I was notOn 08/09/2024 16:39, Ben Bacarisse wrote:>Bart <bc@freeuk.com> writes:OK, so what are they?
>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.
TM:Yes, very good. I count four or five, depending on whatdifferences count as different.
>
I guess nobody is going to say what those extra categories are, are
they?
counting forms in parentheses).
It's bad form to call somebody out on something but then refuse to tellYou have implemented a C compiler. The wind-up I sensed was your giving
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.
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.
f().m where f returns a struct.>I can think of at least one expression form for X that contradicts thisExample?
claim.
Nothing here either.
Les messages affichés proviennent d'usenet.