473,543 Members | 2,405 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

lint still useful?

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
3 4416
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
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.
Apr 11 '08 #3
On Fri, 11 Apr 2008 11:58:12 -0700, user923005 wrote:
On Apr 11, 5:27Â*am, "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.

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

33
707
by: Greg Roberts | last post by:
We have a large code base, mainly C but with some C++ which we wish to check for existing issues in an effort to be proactive. I have downloaded the open source GLINT program but am having big problems trying to get it to run. I will be looking at PC-Lint at http://www.gimpel.com/ Does anyone have any other recommendations, it can be...
1
2882
by: Tom | last post by:
I've been using Gimpels PC-Lint static analysis tool (which seems to be extremely good value for money) but I've come up against a couple of problems, although the second is more of a wondering... 1) I'm trying to integrate Lint with the IAR ARM compiler and it will successfully summon Lint but lint itself either reports "failure to open...
6
5463
by: Dom Gilligan | last post by:
Does anyone know of a C++ lint, preferably free? I've inherited a large code base and need to remove some unused functions. What I've found so far: gcc -O2 does *not* check for unused functions gcc -Wanything-you-can-think-of doesn't check for unused non-static functions lclint/splint doesn't do C++
2
2121
by: Rahul | last post by:
Hi, I have a little program as follows : =================== STARTS HERE ================ #include <stdio.h> void f (unsigned long); int main() {
4
4754
by: Roman Mashak | last post by:
Hello, All! I often come across the following statements in different source code: #ifndef lint char copyright = "@(#) Copyright (C) 2005 bla-bla-bla\n"; #endif #ifndef lint
15
2413
by: Pat | last post by:
I've been searching for a good multi-module lint checker for Python and I haven't found one yet. Pylint does a decent job at checking for errors only within a single module. Here's one of my problems. I have two modules. In module one, I have a function: def foo( host, userid, password ):
0
7401
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5881
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5260
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4886
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3391
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1810
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
958
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.