Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!oliveb!intelca!mipos3!td2cad!brister From: brister@td2cad.intel.com (James Brister) Newsgroups: comp.lang.c Subject: Re: Evaluation order of assignment. Message-ID: <1045@td2cad.intel.com> Date: 17 Aug 88 20:28:55 GMT References: <957@orion.cf.uci.edu> <13036@mimsy.UUCP> Reply-To: brister@td2cad.UUCP (James Brister) Followup-To: brister@td2cad.intel.com Distribution: na Organization: Intel TD, Santa Clara CA Lines: 17 In article <13036@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: >In article <957@orion.cf.uci.edu> schmidt@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@td2cad.intel.com brister@td2cad.UUCP