Re: Inconsistent behaviour for (1 << 32)
Daniel:
> instead of (1 << getBits()) which might result in this undefined
> behaviour I do (2 << (getBits()-1)) (getBits() is never 0). This should
> be well-defined, right?
Sounds good. Still don't know why you're shifting signed integer types
though.
Martin
|