|lint, was Re: Semicolons (Re: Low-Rent Syntax) firstname.lastname@example.org (1990-08-29)|
|From:||email@example.com (Dale Worley)|
|In-Reply-To:||firstname.lastname@example.org's message of 26 Aug 90 23:07:14 GMT|
|Keywords:||C, debug, lint|
|Date:||Wed, 29 Aug 90 09:47:04 EDT|
From: email@example.com (Bart Massey)
Thus, I tend to use these things the way I use lint, which is to turn them
on only when I really can't understand why some code is broken, and have
been staring at it for hours. Often, GCC or lint will point out a legal but
questionable line of code which will suddenly make the whole problem clear
to me -- especially if I was trying to read someone else's code :-)...
Thus, you've wasted hours of your time when you could have just run
the compiler with warnings enabled *first*.
I prefer the system that PC Lint (a/k/a Generic Lint a/k/a Gimpel
Lint) has -- you can disable any given warning on a line-by-line
basis. Once you get your code cleaned up, you can run Lint with all
warnings enabled *before* you test-run the code. This gets bugs out
at a much smaller cost than test-running. And for those times when
you really need to do something that Lint complains about, you just
tell it to ignore that particular instance. Thus, you never get
warnings that you routinely ignore.
Dale Worley Compass, Inc. firstname.lastname@example.org
[When I used Wizard C, before it turned into Turbo C, one of the nicest
things about it was that the first pass of lint was built into the compiler,
so you automatically got lint warnings whenever you compiled anything. You
could turn off the warnings, either by category via command line switches or
in the source code via /*NOTREACHED*/ and the like, but in most cases fixing
the code to satisfy lint either fixed a bug or improved bad style. -John]
Return to the
Search the comp.compilers archives again.