Hacker News new | past | comments | ask | show | jobs | submit login

On x86 the shift only looks at the leftmost 5 bits, so 1<<33 is 2. Whereas elsewhere 1<<33 may be 0. It wouldn't be strange if a platform decided to have 1<<33 throw an overflow fault. The key is that this choice should really be up to the platform, not the compiler



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: