Re: drivers/char/sysrq.c

From: H. Peter Anvin (hpa@zytor.com)
Date: Fri May 30 2003 - 15:29:05 EST


Followup to: <20030530151317.GA3973@xxxxxxxxxxxxxxxx>
By author: "J.A. Magallon" <jamagallon@xxxxxxx>
In newsgroup: linux.dev.kernel
>
> I see a diff:
> - & is bitwise and you always perform the op
> - && is logical and gcc must shortcut it
>
> I think people use & 'cause they prefer the extra argument calculation
> than the branch for the shortcut (AFAIR...)
>
> or not ?
>

In this case it doesn't matter, since gcc should be able to prove the
right-hand-side is side-effect free.

-hpa
--
<hpa@xxxxxxxxxxxxx> at work, <hpa@xxxxxxxxx> in private!
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/