DEFINITE bug in Turbo C 2.0

Doug Gwyn gwyn at smoke.BRL.MIL
Sun Mar 25 08:30:34 AEST 1990


In article <103 at sail.procase.UUCP> tyler at 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.)



More information about the Comp.lang.c mailing list