Lvalues and casts

Bob Larson blarson at skat.usc.edu
Wed May 24 03:19:53 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?

Casts are never lvalues.

Gcc documents this bug as a feature.  (Hopefully it is caught
by -pedantic)
-- 
Bob Larson	Arpa:	blarson at skat.usc.edu
Uucp: {uunet,cit-vax}!usc!skat!blarson
Prime mailing list:	info-prime-request%ais1 at ecla.usc.edu
			usc!ais1!info-prime-request



More information about the Comp.lang.c mailing list