for this uvlong u, i;
i = 31; u = 0xff00000000000000ull; i get u & 1<<i -> 0xff00000000000000ull u & 0x80000000 -> 0 u & (int)0x80000000 -> 0xff00000000000000ull u & -2147483648 -> 0 to put a finer point on it, (uvlong)(1<<i) -> 0xffffffff80000000 (uvlong)(0x80000000) -> 0x80000000 (uvlong)(int)0x80000000 -> 0xffffffff80000000 (uvlong)-2147483648 -> 0x80000000 so it seems clear that constants are treated as if unsigned, regardless, but variables are not? can this be correct? i hate to hazzard guesses about the c standard. - erik