> many compilers fail to diagnose undefined behavior or do so incorrectly.
It would be much easier if undefined behaviour was better defined, because then a compiler could recognize it and diagnose it. Of course then it wouldn't be undefined behaviour any more, so problem solved.
The bounds of what consists undefined behavior is, well, defined. The “undefined” bit refers to the behavior in this case, not its ability to be recognized.
It would be much easier if undefined behaviour was better defined, because then a compiler could recognize it and diagnose it. Of course then it wouldn't be undefined behaviour any more, so problem solved.