You have to deal with integer promotions and all that when doing arithmetic,
because arithmetic needs to be done with a like number of bits on both sides
of the operation. But with shifting, all your doing is asking it to shift some
number of bits. The type which holds the number of bits shouldn't really
matter. I wouldn't expect _any_ integer promotions to occur in a shift
expression. If you want to affect what's being shifted, then cast what's being
shifted.


That's right... Somehow it didn't occur to me till the last moment that bit shift is asymmetric in nature so it really shouldn't do any promotions.
Sorry for the noise.

--
Dmitry Olshansky

Reply via email to