A cast pointer is NOT an lvalue!? (ANSI C)

Kyle Jones kjones at talos.UUCP
Tue Oct 11 06:01:18 AEST 1988


In article <479 at midgard.mn.org> dal at syntel.UUCP (Dale Schumacher) writes:
>    if(p = malloc(sizeof(struct big_thing)))
>        *((struct big_thing *) p) = big;

This is valid.  The unary * converts cast pointer to an lvalue.



More information about the Comp.lang.c mailing list