On Mon, Apr 19, 2010 at 03:02:05AM +0000, Christos Zoulas wrote:
> In article <20100419021334.ga8...@britannica.bec.de>,
> Joerg Sonnenberger  <jo...@britannica.bec.de> wrote:
> >On Sun, Apr 18, 2010 at 10:51:35AM +0000, Alan Barrett wrote:
> >> Log Message:
> >> Bitwise operations on signed types are well-defined if the values
> >> happen to be positive, and indeed the values here were guaranteed
> >> to be positive, but some compilers complained anyway, so convert
> >> the bitwise operations to arithmetic operations.
> >
> >In that case use an explicit cast to the unsigned type. What you did is
> >penalize the code for no good reason.
> 
> Any compiler these days knows how to do these micro-optimizations.

For *unsigned* that is easy. For *signed* it is a lot harder.

Joerg

Reply via email to