1 << BITS_PER_UNIT
Richard Earnshaw
rearnsha@arm.com
Wed Oct 14 21:17:00 GMT 1998
>
> While there's a crusade on to remove egcs compilation warnings, here's
> one for interested folks to consider.
>
> It regards the use of (1 << BITS_PER_UNIT), usually when computing a
> bit mask with (1 << BITS_PER_UNIT) - 1, when BITS_PER_UNIT is equal to
> the number of bits in a HOST_LONG_INT. This occurs with the C4x
> target where BITS_PER_UNIT is 32. Maybe there should be a macro,
> say BITS_PER_UNIT_MASK?
>
> Michael.
>
Or just use (2 << (BITS_PER_UNIT - 1))
Same result, but no warning.
Richard
More information about the Gcc
mailing list