▲ 258 ▼ I mean it could be right (i.imgur.com) submitted 2 years ago by genfood@feddit.de to c/programmer_humor@programming.dev 19 comments fedilink hide all child comments
[–] Hotzilla@sopuli.xyz 6 points 2 years ago (1 child) What if int overflows? Is it still false? permalink fedilink source parent hideshow 2 child comments replies: [–] rhpp@programming.dev 11 points 2 years ago (1 child) 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++ permalink fedilink source parent hideshow 2 child comments replies: [–] chellomere@lemmy.world 2 points 2 years ago* No, because it's UB, the compiler is free to do whatever, like making demons fly out of your nose permalink fedilink source parent
[–] rhpp@programming.dev 11 points 2 years ago (1 child) 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++ permalink fedilink source parent hideshow 2 child comments replies: [–] chellomere@lemmy.world 2 points 2 years ago* No, because it's UB, the compiler is free to do whatever, like making demons fly out of your nose permalink fedilink source parent
[–] chellomere@lemmy.world 2 points 2 years ago* No, because it's UB, the compiler is free to do whatever, like making demons fly out of your nose permalink fedilink source parent