Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!snorkelwacker.mit.edu!hsdndev!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.lang.c Subject: Re: The nonexistent operator (along = v. == lines) Message-ID: <25483:Apr621:53:3191@kramden.acf.nyu.edu> Date: 6 Apr 91 21:53:31 GMT References: <156@revcan.UUCP> <157@revcan.UUCP> <372@smds.UUCP> Organization: IR Lines: 10 In article <372@smds.UUCP> rh@smds.UUCP (Richard Harter) writes: > #define AND(a,b) ( !(a) ? ((b) && 0) : !!(b) ) > appears to do the trick, modulo typoes. However it occurs to me that a > "clever" optimizing compiler would recognize that ((b) && 0 ) is always > false and bypass the evaluation of b. Perhaps the language lawyers can > tell us if the language specifications *require* that b be evaluated. I'm not much of a language lawyer, but yes, b is evaluated once. ---Dan