4 ms·
Some small steps could have been made years ago. For instance, getting rid of unspecified order of evaluation. Or defining a dialect of ISO C in which evaluati
by kazinator 11y ago
Some small steps could have been made years ago.
For instance, getting rid of unspecified order of evaluation. Or defining a dialect of ISO C in which evaluation is strictly left to right, and making support for that optional (so then your local GCC or whatever can have -fstrict-iso-eval to turn it on).
Another example of "small stuff": catching negative values being passed into the <ctype.h> functions. Also, all the instances in the standard library where a null pointer invokes undefined behavior could be required to abort the program.
Some undefined behaviors cannot be made defined without a lot of overhead (like catching all out of bounds pointers).
However, there is a lot of "low hanging fruit" undefined behavior where things can be improved.