*BSD News Article 17266


Return to BSD News archive

Newsgroups: comp.os.386bsd.misc
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!math.ohio-state.edu!cs.utexas.edu!swrinde!emory!sol.ctr.columbia.edu!hamblin.math.byu.edu!news.byu.edu!ns.novell.com!gateway.univel.com!fcom.cc.utah.edu!cs.weber.edu!terry
From: terry@cs.weber.edu (A Wizard of Earth C)
Subject: Re: Prototypes
Message-ID: <1993Jun17.210504.22182@fcom.cc.utah.edu>
Sender: news@fcom.cc.utah.edu
Organization: Weber State University, Ogden, UT
References: <1vib9c$oe7@agate.berkeley.edu> <37263@castle.ed.ac.uk>
Date: Thu, 17 Jun 93 21:05:04 GMT
Lines: 23

In article <37263@castle.ed.ac.uk> richard@castle.ed.ac.uk (Richard Tobin) writes:
>In article <1vib9c$oe7@agate.berkeley.edu> wjolitz@soda.berkeley.edu (William F. Jolitz) writes:
>>I found that this was well worth the effort, since function prototypes
>>and a more formal typechecking proceedures caught quite a number of
>>"little" problems. What more can you do here with ANSI C?
>
>I'd be interested to know whether prototypes gave you any help that
>"lint" would not have.

Just the opposite actually; lint not only complains about parameter types
and count and pointer conversion (with a nicer message than gcc), it also
complains about use without prior initialization and other not-so-obvious
stuff that doesn't become apparent unless all the code is taken as a whole
(something the compiler can't do without smarter linker technology).

Lint is a lot better than prototypes for identifying more errors.


					Terry Lambert
					terry@icarus.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.