3 ms·
> Instead of cramming as much optimization into undefined behavior as you can, maybe don't allow the undefined behavior in the first place? 1. that's what -fsa
by masklinn 9y ago
> Instead of cramming as much optimization into undefined behavior as you can, maybe don't allow the undefined behavior in the first place?
1. that's what -fsanitize=undefined is for
2. because the code you see here plainly written could also be the result of multiple rounds of previous optimisations (mostly inlining) which ends up leaving a bunch of redundant or nonsensical null checks
- Sean1708 9y agoI think clang-tidy can also do some UB checks without having to run the program.