Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
mohawk
· 11y ago · 0 comments
Signed types have the same "wraparound" problem, i think the OP meant that they don't have this problem at the zero boundary.
Comments
[–]
mikeash
11y ago
Signed types have a worse problem. They
typically
wrap around, but the behavior is undefined. That means the compiler can assume it never happens and optimize your code accordingly, which can lead to all sorts of entertaining misbehavior.
[–]
mohawk
OP
11y ago
Sorry meant two's complement