cond. op. on ='s LHS
Stanley Friesen
sarima at tdatirv.UUCP
Thu Feb 21 05:15:18 AEST 1991
In article <335 at ptcburp.ptcbu.oz.au> michi at ptcburp.ptcbu.oz.au (Michael Henning) writes:
>throopw at sheol.UUCP (Wayne Throop) writes:
>> this is irrelevant since the result of * always is [an lvalue].
^^^^^^^^^^^^^^^^^^^^^
>What about
>int array[10][10];
>and an expression
> *array
>The type of the expression after dereferencing is "array of 10 ints", which
>is *not* an lvalue.
Yes it is, at least according to the ANSI definition of lvalue. It is just
not a *modifiable* lvalue. [Of course this is 'promoted' to a pointer to int
in most contexts].
In fact the ANSI standard explicitely states that the result of the unary *
operator is an lvalue (with *no* conditions).
--
---------------
uunet!tdatirv!sarima (Stanley Friesen)
More information about the Comp.lang.c
mailing list