Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ucdavis!deneb.ucdavis.edu!cck From: cck@deneb.ucdavis.edu (Earl H. Kinmonth) Newsgroups: comp.unix.xenix Subject: lint vs prototypes Message-ID: <4998@ucdavis.ucdavis.edu> Date: 30 Jul 89 17:58:10 GMT Sender: uucp@ucdavis.ucdavis.edu Reply-To: cck@deneb.ucdavis.edu (Earl H. Kinmonth) Organization: University of California, Davis Lines: 41 [header lost, sorry] >Personally, I went on a prototype kick for about six months about two >years back. Everything was strictly prototyped, and I had a set of >standard macros to elide the prototypes for lint. I would say that >during this entire time, prototypes provided me absolutely no benefit >whatsoever. I went the opposite direction, a lint kick, if you will, and this produced and not much else. (If any of my comments are totally inappropriate by virtue of being based on 286 experience, don't flame. Rather send your spare change to the Fund-To-Buy-Me-A-386.) (a) lint messages come in half a dozen different formats, none of which is particularly essay to integrate into the source text (and SCO xenix does not include the Berkeley style 'error' program to do this for you); (b) lint breaks regularly (runs out of core, stops saving messages) on source files that the compiler is perfectly happy with; (c) lint does not really provide portability warnings for coding that regularly causes me problems (big vs little endian machines, far, near usage, etc.); (d) on my (286) machine, lint is even slower than the large model of the compiler, which is to say ssslllooowww. Rather than using lint, I find it much more efficient to move my code to MSDOS and run it through Turbo C with all the warnings turned on. The ratio of significant warnings to chaff is higher than for lint, and changes are easier. I've even done this with useful effect for code that could not possibly run under **IX. As for prototypes, they've saved my butt a number of times. Unfortunately, this has usually happened after I'd wasted an hour or two before I heeded the warning that some function did not have a prototype --- and the problem turned out to be a subtle parameter mismatch.