Re: Why is UInt32 << 32 a no-op?
Re: Why is UInt32 << 32 a no-op?
- Subject: Re: Why is UInt32 << 32 a no-op?
- From: Alastair Houghton <email@hidden>
- Date: Tue, 17 Nov 2009 18:28:14 +0000
On 17 Nov 2009, at 17:19, Jocelyn Houle wrote:
> So, it's a hardware limitation... (an extra sticky bit could have handled all possible cases, I guess).
Strictly speaking, as an earlier poster correctly points out, such behaviour is undefined according to the C standard, which is the important thing here.
The reason, of course, is that some hardware has this limitation, whereas other hardware does not. The most likely two results you'd see are (a) a shift of (shift2), or (b) 0, if shift >= 32. Some architectures (and I have a suspicion that PowerPC may be one of them) may not even define which is to be expected at the assembly level, and may leave it to individual implementations even there.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden