Comment on I mean it could be right
abbadon420@lemm.ee 1 year ago
The third one is just (x=x+1), because the middle bit is just always false and can be ignored.
Comment on I mean it could be right
abbadon420@lemm.ee 1 year ago
The third one is just (x=x+1), because the middle bit is just always false and can be ignored.
Hotzilla@sopuli.xyz 1 year ago
What if int overflows? Is it still false?
rhpp@programming.dev 1 year ago
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++
chellomere@lemmy.world 1 year ago
No, because it’s UB, the compiler is free to do whatever, like making demons fly out your nose