Re: bit-wise vs. conditional or (kernel bugs found using inspect)

From: Horst von Brand (
Date: Fri Feb 25 2000 - 17:16:25 EST

Q <> said:


> It's not because something returns the value 0, that is is represented by
> all 0 bits.

If it looks like 0, and smells like 0...

> The value of a comparision is the value 0 (false) or 1 (true),
> but you can't assume anything on how it is represented in hardware.

If it looks ...

> Therefor using a bit-wise operation just makes no sense, and only does for
> data where you manipulate bits itself, like in bitfields.

This are 0s and 1s in C. How the compiler makes sure the effect of the
statement matches what the source says is irrelevant.

Horst von Brand                   
Casilla 9G, Viņa del Mar, Chile                               +56 32 672616

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue Feb 29 2000 - 21:00:14 EST