Gollum to Programmer [email protected] • 1 year agoI mean it could be righti.imgur.comimagemessage-square19fedilinkarrow-up1270arrow-down116 cross-posted to: [email protected]
arrow-up1254arrow-down1imageI mean it could be righti.imgur.comGollum to Programmer [email protected] • 1 year agomessage-square19fedilink cross-posted to: [email protected]
minus-square@[email protected]linkfedilink10•1 year agoStill false, thanks to compiler optimizations. Remember that integer overflow is UB. (unless you’re using unsigned int or a programming language which strictly defines integer overflow, possibly as an error) P.S.: Assuming this is C/C++
minus-square@chellomerelink2•edit-21 year agoNo, because it’s UB, the compiler is free to do whatever, like making demons fly out of your nose
What if int overflows? Is it still false?
Still false, thanks to compiler optimizations. Remember that integer overflow is UB. (unless you’re using unsigned int or a programming language which strictly defines integer overflow, possibly as an error)
P.S.: Assuming this is C/C++
No, because it’s UB, the compiler is free to do whatever, like making demons fly out of your nose