On 18 December 2006 19:31, Robert Dewar wrote:
> Chris Lattner wrote:
>
>> Thus, the transformation is safe in this specific case on i386.
>> However, shifting a 32-bit value left by 33 bits would not be safe.
>
> That's the case where the transformation IS safe, since shifting a
> 32-bit value left by 33 bits gives an undefined result as I understand
> things.
Only a compiler developer could say "It's safe because it's undefined so it
doesn't matter what it does"! :)
I'm fairly sure most /users/ would call undefined behaviour dangerous...
cheers,
DaveK
--
Can't think of a witty .sigline today....