Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
asimpletune
6y ago
0 comments
Save
Share
Why is shifting by a negative amount undefined?
0 comments
1 comments · 1 top-level
top
newest
oldest
kps
6y ago
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’.
j
/
k
navigate · click thread line to collapse