3 ms·
I'm not sure what you're recommending here. There are many, many ways to trigger undefined behavior. The compiler won't tell you when you might be. Well, unless
by sfink 3y ago
I'm not sure what you're recommending here. There are many, many ways to trigger undefined behavior. The compiler won't tell you when you might be. Well, unless you're using a sanitizer like ubsan, but even then it'll only tell you about some. So I'm not sure when I should go fix my program that I don't know needs to be fixed.
Yes, in theory you could internalize all of the rules and write UB-free code. While you're at it, be sure you only write code with no bugs at all. I'm not sure why everyone isn't doing that already...