Evaluation order of assignment.
James Brister
brister at td2cad.intel.com
Thu Aug 18 06:28:55 AEST 1988
In article <13036 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
>In article <957 at orion.cf.uci.edu> schmidt at bonnie.ics.uci.edu (Douglas
>C. Schmidt) writes:
>>Is the following always guaranteed to produce the "intended" result:
>>
>> return(head->next = head = (struct list *) malloc(sizeof(struct list)));
>
>Aside from the fact that there are two `*'s missing, and that malloc
>can return NULL, the answer is no.
>
I'm curious; Why not? (assuming the two '*' were there and that malloc never
returned NULL.
-------------------------------------------------------------------------------
James Brister "In my previous life I was Shirley McLaine"
brister at td2cad.intel.com
brister at td2cad.UUCP
More information about the Comp.lang.c
mailing list