Re:Undefined behavior in C is a reading error
by rectang on Thursday May 20, 2021 @09:06PM
(#27229394)
I despair at writing C code where the compiler won't silently surprise me. How are we supposed to learn all these subtle rules and intuit when to apply them without making any mistakes?
[ Parent
| on HN ]
By learning only the most important rules, and then enable the compilers undefined behaviour sanitizer(1) during development, making mistakes, and fixing them.
(1)https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#...