Path: utzoo!attcan!uunet!husc6!spdcc!ima!haddock!karl From: karl@haddock.ISC.COM (Karl Heuer) Newsgroups: comp.std.c Subject: Re: the logical xor operator! Message-ID: <4772@haddock.ISC.COM> Date: 27 Jun 88 17:50:16 GMT References:<1719@ogcvax.ogc.edu> <1309@ark.cs.vu.nl> <1310@ark.cs.vu.nl> <3254@rpp386.UUCP> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 10 In article <3254@rpp386.UUCP> jfh@rpp386.UUCP (The Beach Bum) writes: >in particular, i believe (a == 0)^(b == 0) most likely can't be as well >optimized as (a == 0)!=(b == 0). Nonsense. "!=" and "^" produce the same result when both operands are normalized booleans; therefore a compiler which detects this situation is free to generate its favorite logical-xor construct for both. In practice, few if any compilers bother to do this. Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint