On 11 Apr, 13:27, "copx" <c...@gazeta.pl wrote:
I saw one here posting the output of a lint tool in a thread, and that made
me wonder whether using such tools are still useful.
I mean, modern compilers are lint tools themselves, the list of warnings GCC
can produce is almost endless for example. I heard that lint was used in the
past mainly because C compilers provided only minimal sanity checks back
then.
There is practically an unlimited number of
heuristics a code checking tool can use to
guess that the programmer meant to write one
thing and ended up typing another. If the
programmer is willing to add comments in a
specific format to aid the code checking tool
(like splint allows) then there's even more
room for originality. So how useful they are
depends on how careful the programmer is, how
likely he is to make the kind of mistakes a
code checking tool can diagnose, how willing
he is to play around with the different options
of a code checking tool to find a combination
which helps him the most etc. It's a very
personal thing like for example the choice of
programming language (if one has a choice).
Do you use a lint tool? If yes, which one?
Sometimes I use splint and sometimes Sun lint.
I haven't found one which I'm very happy with
but I haven't experimented much with splint's
options.