Automatically make buggy code pass static checkers! Yay!
Automatically make buggy code pass static checkers! Yay!
Posted Apr 6, 2006 0:59 UTC (Thu) by xoddam (subscriber, #2322)In reply to: Limitations and Evolution by eru
Parent article: Coverity: one bug fixed every six minutes
> most changes could be automated
You mean, you could automatically convert existing buggy
code into something semantically identical which passes
all your new-fangled static checking.
>... it would probably not be too much work to implement it
> as an option in GCC.
splint already supports most of the things you suggest, without
changes to the syntax of C itself (it uses comments and/or
macros) or to the semantics of existing code. Running an
extra checker over the source isn't very much different from
enabling a compiler option. And like -Wall and -Werror, you
can gradually fix warnings by hand, then decide on a per-compilation-unit
basis when to enforce them.
http://www.splint.org
