By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,562 Members | 1,264 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,562 IT Pros & Developers. It's quick & easy.

lint still useful?

P: n/a
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.

Do you use a lint tool? If yes, which one?

Apr 11 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
copx 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.

Do you use a lint tool? If yes, which one?
The one I use is an imperfect imitation of Karl W. Z. Heuer,
emulated on inferior wetware.

--
Er*********@sun.com
Apr 11 '08 #2

P: n/a
On 11 Apr, 13:27, "copx" <c...@gazeta.plwrote:
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.
Apr 11 '08 #3

P: n/a
On Fri, 11 Apr 2008 11:58:12 -0700, user923005 wrote:
On Apr 11, 5:27*am, "copx" <c...@gazeta.plwrote:
>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.

They are still useful. I lint all of my work.
As should everyone.
>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.

Modern compilers have better error checking than before. But Lint is
better.
>Do you use a lint tool? If yes, which one?

Splint for C (it's free):
http://www.splint.org/
Fair advice.
(Note that splint does not work with C++ code).
PC-Lint for C and C++ on a PC (it's commercial): http://www.gimpel.com/
Excellent advice.
And Flexelint for C and C++ on non-PC platforms (same location as PC-
Lint).
Excellent advice.
I also use bounds checkers and design verification tools and case tools
and anything else I can get my hands on. They make you look a lot
smarter than you are by finding things you are too dull to notice.
;-)
Excellent advice.

The more compilers and tools you can use on your code the better, IMHO.

--
jay

http://www.microsoft.com/express/
http://www.ubuntu.com/
http://www.parasoft.com/
http://www.gimpel.com/
http://www.coverity.com/
http://www.bullseye.com/
http://gcc.gnu.org/onlinedocs/gcc/Gcov.html
http://www.splint.org/

Jun 27 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.