Re: A lesson for compiler warning writers

wicklund@intellistor.com (Tom Wicklund)
Thu, 18 Jun 1992 23:02:42 GMT

          From comp.compilers

Related articles
[3 earlier articles]
Re: A lesson for compiler warning writers maniattb@cs.rpi.edu (1992-06-17)
Re: A lesson for compiler warning writers stephen@estragon.uchicago.edu (1992-06-18)
Re: A lesson for compiler warning writers arnold@cc.gatech.edu (1992-06-18)
Re: A lesson for compiler warning writers xjam@cork.CS.Berkeley.EDU (1992-06-18)
Re: A lesson for compiler warning writers hays@ssd.intel.com (1992-06-18)
Re: A lesson for compiler warning writers kendall@centerline.com (1992-06-19)
Re: A lesson for compiler warning writers wicklund@intellistor.com (1992-06-18)
Re: A lesson for compiler warning writers dds@doc.imperial.ac.uk (Diomidis Spinellis) (1992-06-19)
Re: A lesson for compiler warning writers hagerman@ece.cmu.edu (1992-06-19)
Re: A lesson for compiler warning writers igor!voltaire!davidm@uunet.UU.NET (1992-06-19)
Re: A lesson for compiler warning writers dww@inf.fu-berlin.de (1992-06-20)
Re: A lesson for compiler warning writers preston@dawn.cs.rice.edu (1992-06-21)
Re: A lesson for compiler warning writers mjr@decuac.DEC.COM (1992-06-22)
[5 later articles]
| List of all articles for this month |
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]
--


Post a followup to this message

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