Liste des Groupes | Revenir à cl c |
Bart <bc@freeuk.com> writes:I dispute that. What I said is very broadly correct. But in this newgroup you do like to nitpick.
On 11/09/2024 01:02, Ben Bacarisse wrote:Yes, that incorrect explanation.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
The _Generic forms reduce down one of those four. It is more like a macro, and if you're going to start with macros, there are unlimited categories that can be created. If this is merely about syntax, then why not?Clearly I mean VALID LHSs, otherwise they wouldn't be LHSs of assignments!Along with (a) _Generic expressions (where the selected arm is an
>
I've since learnt about a couple of other possible categories; one is with
compound literals like '(int){42} = 0'.
lvalue)
and (b) expressions of the form X->m.Are there any circumstances where X->m does something different from (*X).m?
Keith mentioned this form.(I don't count (A), ((A)) etc as aDon't give me "come on!". I was counting forms in the same way that you
separate category; come on!)
were when I said I could think of three more. I was not counting
parentheses.
Not entirely. There is behaviour associated with them.The other is 'X.m' but when .m is a bitfield;What makes X.m = Y, where m is a bitfield, an extra category? It fits
the X.m = Y pattern perfectly well.
although this has the sameYour categories were syntactic. You were describing forms.
same syntax as above, internally it's somewhat different.
Les messages affichés proviennent d'usenet.