3 ms·
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 wi
by rectang 5y ago
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?
- jchb 5y agoBy 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#ubsan-checks https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#...