Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!uakari.primate.wisc.edu!sdd.hp.com!swrinde!elroy.jpl.nasa.gov!ucla-cs!maui.cs.ucla.edu!jon From: jon@maui.cs.ucla.edu (Jonathan Gingerich) Newsgroups: comp.lang.c Subject: Re: Evaluation of if's Message-ID: <1991Jun7.232119.17834@cs.ucla.edu> Date: 7 Jun 91 23:21:19 GMT References: <20273@crdgw1.crd.ge.com> <1991Jun7.011938.11342@wdl1.wdl.loral.com> Sender: usenet@cs.ucla.edu (Mr. News Himself) Distribution: usa Organization: UCLA Computer Science Department Lines: 17 Nntp-Posting-Host: maui.cs.ucla.edu Having raised exactly this subject several months ago, let me point out that both sides are making valid points. There are two distinct things going on: 1. The description of the value of an assignment expression is sufficiently ambiguous in both K&RI and ANSI as to make the variability of ((i=1)==(i=2)) a reasonable question. This is not directly answered in the FAQ. It is not a `order of evaluation' question. It is not obvious. 2. There is no question that there is a rule in ANSI only, which says that expression which access the same location more than once are undefined. The above expression is undefined as is any other expression (to the best of my knowledge) that would illustrate a difference in the evaluation of an assignment expression. Jon.