Joe Buck wrote:
Right. However, some coverage-oriented methodologies explicitly mark code that is expected to be unreachable, and produce unit tests to exercise at least some of the defensive code that no longer gets run by the compiler as a whole. If any volunteers would like to take on the job of improving and tracking coverage (by a combination of more tests, unit tests, and marking code that is currently unreachable but should remain for safety purposes) that could be helpful.
Absolutely, doing systematic coverage work of this kind would indeed be very helpful! I am not sure though that we want unit tests per se, much more useful are tests that excercise the code in the context of a complete gcc build.