lint vs prototypes

William Davidsen davidsen at sungod.crd.ge.com
Mon Jul 31 08:12:02 AEST 1989


  I use prototypes all the time. I even wrote a little package to
generate the prototype files which I include as .h files in my programs.
lint is a neat tool, but it has three shortcomings:
	1) it doesn't find all the problems
	2) it finds non-problems
	3) it doesn't fix any problems (where protypes cause
	   coersion)

  Therefore lint by itself is not a complete solution. I usually run
with prototypes and pass lint of a program when it's about to go into
another production release. I like the MSC/Xenix compilers with the
warnings turned up, although you may have to filter out some which are
not meaningful in most cases.

  Prototypes can be left in a program, while lint is a tool rather than
a part of a well designed program. I use both, but I find prototypes
catch more errors, since I don't have to run an extra step to see the
errors.
	bill davidsen		(davidsen at crdos1.crd.GE.COM)
  {uunet | philabs}!crdgw1!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me



More information about the Comp.unix.xenix mailing list