lkml.org 
[lkml]   [2000]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: bit-wise vs. conditional or (kernel bugs found using inspect)
Date
From
Q <Q@ping.be> 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 vonbrand@sleipnir.valparaiso.cl
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 majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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