Liste des Groupes | Revenir à cl c |
On 11/09/2024 01:02, Ben Bacarisse wrote:Bart <bc@freeuk.com> writes:>>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?
Which incorrect explanation was that?
>
I merely said that LHSs of assigments fall into these categories:
>
A = Y; // name
*X = Y; // pointer
X[i] = Y; // index
X.m = Y; // member select
Clearly I mean VALID LHSs, otherwise they wouldn't be LHSs of assignments!
>
I've since learnt about a couple of other possible categories; one is with
compound literals like '(int){42} = 0'.
(I don't count (A), ((A)) etc as a
separate category; come on!)
The other is 'X.m' but when .m is a bitfield;
although this has the same
same syntax as above, internally it's somewhat different.
(My C compiler
treats bitfields as ordinary members.)
>
I acknowledge that allowing 'F().m = Y' is wrong;
I might get around to
fixing it one day.
Les messages affichés proviennent d'usenet.