On 5/22/08, David Tweed <[EMAIL PROTECTED]> wrote:
> #define TAGMASK         ((int)((1LL << LENGTH(tags) + 1) - 1))
>
> Incidentally, I think in the alphabet soup misdesign of C numeric
> constants, I suspect the code probably wants 1ULL and given long long
> is 64-bits and int is 32-bit on most 64-bit Linux platforms I don't
> understand the cast here.

imho the LL (and the + 1 ?) is not needed

i guess the purpose of the LL here was to make sure it works for the
"all ones" case
(so it was enough that long long has at least one more bits than int,
the signedness does not matter)

..but (if eg int is 32 bit and we have 32 tags then) 1<<32 is 0, and
-1 is "all ones" in binary (guaranteed by the c standard)

Reply via email to