lint, was Re: Semicolons (Re: Low-Rent Syntax)

worley@compass.com (Dale Worley)
Wed, 29 Aug 90 09:47:04 EDT

          From comp.compilers

Related articles
lint, was Re: Semicolons (Re: Low-Rent Syntax) worley@compass.com (1990-08-29)
| List of all articles for this month |
Newsgroups: comp.compilers
From: worley@compass.com (Dale Worley)
In-Reply-To: bart@videovax.tv.tek.com's message of 26 Aug 90 23:07:14 GMT
Keywords: C, debug, lint
Organization: Compilers Central
Date: Wed, 29 Aug 90 09:47:04 EDT

    From: bart@videovax.tv.tek.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. worley@compass.com
[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]
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.