Can lint help an ANSI-C programmer?

Anthony Shipman als at bohra.cpg.oz
Thu May 31 13:16:30 AEST 1990


In article <00937758.16FBE220 at rigel.efd.lth.se>, e89hse at rigel.efd.lth.se writes:
>  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.

Lint does more than just type checking. It checks for possible logic errors
too. A frequent life saver is the way it warns me when it finds:

		if (x = 1)
		{
		...
		}
Other checks include unreachable code etc which may indicate coding errors.
-- 
Anthony Shipman                               ACSnet: als at bohra.cpg.oz.au
Computer Power Group
9th Flr, 616 St. Kilda Rd.,
St. Kilda, Melbourne, Australia
D



More information about the Comp.lang.c mailing list