Nope. Try again - write a small test to do this (and don't use a
_constant_ 32, because a constant 32 will be noticed by the compiler, and
because it is undefined behaviour the compiler is free to do whatever it
wants to (gcc _happens_ to return 0).
Linus
-----
unsigned long test(unsigned long val, int shift)
{
return val >> shift;
}
int main(int argc)
{
printf("%08lx\n", test(~0UL, 32));
printf("%08lx\n", (~0UL) >> 32);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu