News for hackers. Stuff that matters.
Re:The Problem with Friendly C by tamana on Wednesday December 23, 2015 @11:30PM (#10787124)
But the compiler could just as well emit a warning "useless NULL comparison" instead of blithely assuming that the programmer intentionally wrote a book expression. That wouldn't handle every case of UB, but would handle many.
Re:The Problem with Friendly C by superuser2 on Thursday December 24, 2015 @01:45AM (#10787369)
A warning on removed dead code isn't helpful because dead come is legitimately removed all the time. No one would ever heed it.
Re:The Problem with Friendly C by slavik81 on Thursday December 24, 2015 @09:15AM (#10788192)
If you ignored dead code produced by macros and limited the check to function-scope, I think you'd mostly eliminate false positives.