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

Why is shifting by a negative amount undefined?



Because people want `c = a << b` to compile into `shl c, a, b` and C89 made the giant mistake of calling it ‘undefined’ instead of ‘implementation-defined, possibly fatal’.




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

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

Search: