Hacker News new | past | comments | ask | show | jobs | submit
Does C automatically wrap? I thought you need to pass `-fwrapv` to the compiler to ensure that.
Unsigned overflow wraps. Signed overflow is undefined behavior.
loading story #41852909
-fwrapv is for signed integer overflow not unsigned.
loading story #41853085
{"deleted":true,"id":41852877,"parent":41852615,"time":1729024898,"type":"comment"}