Lvalues and casts

Doug Gwyn gwyn at smoke.BRL.MIL
Wed May 24 06:06:36 AEST 1989


In article <847 at tub.UUCP> net at tub.UUCP (Oliver Laumann) writes:
>	(int *)cp = ip;
>The PCC, however, says "illegal lvalue in assignment".  Is this legal
>C, i.e. is the result of a cast really an lvalue?

No, to the contrary it is not, and that is what the compiler is trying
to tell you in its obscure way.  The target of an assignment is required
to be a modifiable lvalue.



More information about the Comp.lang.c mailing list