this post was submitted on 16 Mar 2025
800 points (98.2% liked)

Programmer Humor

22219 readers
1593 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 2 years ago
MODERATORS
800
C++ (ani.social)
submitted 2 weeks ago* (last edited 2 weeks ago) by [email protected] to c/programmer_humor
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 3 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

In some build modes clang will simply put a trap where it sees undefined behavior. https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html

Not saying your wrong, just a fun fact I guess

[โ€“] [email protected] 1 points 2 weeks ago

Yeah that is fun, credit where it's due, compilers do a lot of cool work behind the scenes.