this post was submitted on 21 Oct 2023
258 points (94.5% liked)

Programmer Humor

19589 readers
544 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] rhpp@programming.dev 11 points 1 year ago (1 children)

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 2 points 1 year ago* (last edited 1 year ago)

No, because it's UB, the compiler is free to do whatever, like making demons fly out of your nose