Newsgroups: | comp.compilers |
From: | wicklund@intellistor.com (Tom Wicklund) |
Keywords: | C, lint, design |
Organization: | Compilers Central |
References: | <19920609091040SEB1525@MVS.draper.com> 92-06-084 |
Date: | Thu, 18 Jun 1992 23:02:42 GMT |
arnold@cc.gatech.edu (Arnold Robbins) writes:
>I have said this before, in different forums, but perhaps not as clearly.
>Rigorous compiler checking is a Good Thing, but it is not enough. No C
>compiler in the world will do cross file checking for you, only lint does it.
Back before Borland bought it, the Wizard C compiler for the PC had a lint
option. I think lint was a different program from the front end, but I
suspect that it shared most of the front end source, thus ensuring
compatibility with the compiler.
In the various arguments which I've heard about whether or not lint is
needed, it boils down to either:
yes -- lint is needed because the compiler won't do various cross file
checks or the really picky stuff a good lint does.
no - everything lint does can be built into the compiler (assuming all
files are compiled together). But then the compiler with all
checking options on is lint under a different name.
In the end what's needed is the checks done by lint, whether done under
that name or under the name of the compiler.
[Wizard did all of the one-pass parts of lint every time you compiled
anything. For the interprocedure stuff, the compiler could dump out files
that contained use/def info, and a second pass sorted it together and
pointed out places where they didn't match. This is much the same design
as Unix lint, except that Unix lint used a mutant version of the compiler as
the first pass rather than the compiler itself. -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.