Can lint help an ANSI-C programmer?

Henry Spencer henry at utzoo.uucp
Thu May 31 04:14:27 AEST 1990


In article <6328.265D8157 at puddle.fidonet.org> cspw.quagga at p0.f4.n494.z5.fidonet.org (cspw quagga) writes:
>I'm after some advice on lint...
>1. Is it ANSI C compatible? ...

Ask your supplier.  The original lint dates back well before ANSI C,
so it wasn't, but your supplier may have added improvements.  Given
the incompetence of most Unix suppliers, the answer is probably "no".

>2. I program C the 'new' way - full prototypes, casts, standard ANSI...
>   Is lint likely to discover anything new or give useful advice...

Yes, quite possibly.  It checks many things that typical compilers don't.

>3. Was the intention that ANSI C with prototypes/casts etc.  would remove the
>   need for external checkers like lint?  Can we expect to see the demise of
>   lint in the next few years?

Disciplined use of prototypes largely supersedes lint's cross-file checking,
and a *really* fussy compiler can do most of the within-file checking that
lint does.  Very few compilers are that fussy, however.  Lint is likely to
remain valuable, assuming that suppliers can be convinced to update it to
match their compilers.  If they don't bother, then lint will indeed fall
out of use.
-- 
As a user I'll take speed over|     Henry Spencer at U of Toronto Zoology
features any day. -A.Tanenbaum| uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list