Re: bitops and endianness

Benjamin C.R. LaHaise (blah@kvack.org)
Wed, 4 Feb 1998 10:38:34 -0500 (EST)


On Wed, 4 Feb 1998, Geert Uytterhoeven wrote:

> Wouldn't it be better to declare the bitops to take a pointer to an unsigned
> long, instead of a void *? Then we would at least get a warning when a little
> endian guy does bitops on a char.

Hmmm? But bitops are valid on a char - they're defined to work in little
endian fashion across all platforms, hence there shouldn't be a problem.
Besides, if the caller specifies an out-of-range bit offset, memory will
get overwritten, and there's nothing that can be done about it.

-ben

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu