Path: utzoo!attcan!uunet!wuarchive!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!uflorida!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: DEFINITE bug in Turbo C 2.0 Message-ID: <12426@smoke.BRL.MIL> Date: 24 Mar 90 22:30:34 GMT References: <802@zeusa.UUCP> <103@sail.procase.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 14 In article <103@sail.procase.UUCP> tyler@procase.UUCP (William B. Tyler) writes: >My reading of the ANSI standard implies that the order of >storing the incremented results as compared to the order of >the other operations is not necessarily well-defined. In >other words, this may not be an error. Note that an implementation >is not required to evaluate similar expressions in the same >order in all circumstances. Yes, that's right. Side effects may be deferred until a sequence point, and explicit license is granted for assignment expressions in order to permit maximal optimization. Further, an implementation may randomly decide how to handle each case and need not even do it the same way for successive invocations of the very same code. (Not that I really expect an implementation to toss a coin, but it could be done.)