Messages in this thread | | | From | "Peter T. Breuer" <> | Subject | Re: Kernel bugs found using inspect tool | Date | Wed, 23 Feb 2000 17:35:06 +0100 (MET) |
| |
> [ptb] > > But there are plenty of places in the kernel code where people write > > if ((a == b) || (c == d) || (e < f)) ... It drives me batty, but Linus > > does not seem to mind. > > > > With out-of-order execution, note that if((a == b) | (c == d) | (e < f)) > runs faster if c, d, e, and f have no side effects--and the parens ARE > required.
Eh? But you are using bitwise or. I had logical or, whose order is defined, being that of lazy left-right evaluation, and whose precedence is looser than that of the relational operators precisely so that you can write boolean propositional compounds without those annoying parens.
Or am I wrong? It's been at least 15 years since I read K&R ... Nah. No chance.
Peter
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |