lkml.org 
[lkml]   [2000]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Kernel bugs found using inspect tool
Date
 > [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/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:4.556 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site