still problems with ?:

Karl Heuer karl at haddock.ima.isc.com
Thu Jun 15 04:35:04 AEST 1989


In article <568 at lakart.UUCP> dg at lakart.UUCP (David Goodenough) writes:
>gwyn at smoke.BRL.MIL (Doug Gwyn) sez:
>>[The expression ((a = *p++) && e2 ) || (!a && e3) is well-defined]
>>(except when `p' is used in `e2' or `e3').
>
>Huh??? ... my compiler had better use the value _AFTER_ the *p++ ...

You're right; this is still unambiguous.  The pANS specifies that there is a
sequence point after the evaluation of the first operand of &&, ||, or ?:.

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint



More information about the Comp.lang.c mailing list