Can lint help an ANSI-C programmer?

e89hse at rigel.efd.lth.se e89hse at rigel.efd.lth.se
Thu May 31 07:09:40 AEST 1990


In article <1754 at tkou02.enet.dec.com>, diamond at tkou02.enet.dec.com (diamond at tkovoa) writes:
>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:  I don't use it, and want to know whether
>>I should.
>
>You should.  The question, as you point out below, is whether you CAN.

 At least if you don't have prototypes...

>>3. Was the intention that ANSI C with prototypes/casts etc.  would remove the
>>   need for external checkers like lint?
>
>If prototypes and header files are used properly, then they can duplicate
>a little bit of lint's work.  The answer to this half-question might be
>5% yes and 95% no.  How do casts add any error checking?  In fact, they
>usually defeat error checking.

 I don't see what lint discovers that a C-compiler with prototypes can't
discover, except wrong external declarations like: hello[100], char *hello.

 Henrik Sandell



More information about the Comp.lang.c mailing list