lint vs prototypes

Earl H. Kinmonth cck at deneb.ucdavis.edu
Mon Jul 31 03:58:10 AEST 1989


[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 <extreme frustration> 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.



More information about the Comp.unix.xenix mailing list