Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
RUBwkVjwLsDKgPw
· 10y ago · 0 comments
Just use signed ints. Signed integer underflow is undefined behavior so it can't happen /s
Comments
[–]
gcc_programmer
10y ago
Lol'd . To the contrary, it _can_ happen, and when it does the behaviour is undefined for C/C++. However, rest assured - you are probably on a x86_64 machine programming in sth like Ruby or Java script, so your Apps should be alright :P