Can lint help an ANSI-C programmer?

Barry Margolin barmar at think.com
Fri Jun 1 07:17:15 AEST 1990


In article <009377E6.C32DAB80 at rigel.efd.lth.se> e89hse at rigel.efd.lth.se writes:
>In article <24660 at mimsy.umd.edu>, cml at tove.cs.umd.edu (Christopher Lott) writes:
>>  Lint can also help detect
>>nonportable constructs, but I can't think of a good example just now.
> Yes, but a compiler could warn you about that. (I'm not sure if anyone do.)

There are very few things that lint warns about that a compiler *couldn't*.
But it checks lots of things that many C compilers *don't*.  It is
traditional that C compilers do minimal checking, and lint is used when the
programmer wants extensive checking.  This tradition is fading, though, as
C has reached more environments.  For instance, integrated development
systems such as Turbo C generally ignore this tradition.  GNU C also does
lots of checking (although there are options to control it) because the GNU
developers don't believe in tradition for its own sake.  Additionally,
hardware these days is much faster than the hardware that originally ran C,
so adding the checks to the compiler doesn't make it intolerably slow.
--
Barry Margolin, Thinking Machines Corp.

barmar at think.com
{uunet,harvard}!think!barmar



More information about the Comp.lang.c mailing list