Comment by layer8
11 hours ago
The easy cases like you cite are also those that don’t cause problems in practice. I’m not sure that would help all that much, other than to slightly reduce internet criticism.
11 hours ago
The easy cases like you cite are also those that don’t cause problems in practice. I’m not sure that would help all that much, other than to slightly reduce internet criticism.
Fixing easy cases makes the list shorter, so enables more focus on harder cases.
And it also signals that you actually do want to improve, just a little bit of boy scout rule goes a long way.
The issue is that the list is infinite (anything not specified is UB), so actually removing any finite amount of UB from the list won't make it shorter.
(only slightly tongue-in-cheek, I do believe that removing silly things is worthwhile).
The list of UB categories and rules is not infinite. The list of UB programs is, as is the list of all non UB programs.
2 replies →
The list of unspecified behaviour is infinite, but the list of undefined behaviour is well defined and finite ;)