lint (was: Funny mistake)

Richard A. O'Keefe ok at goanna.cs.rmit.oz.au
Tue Mar 26 20:07:17 AEST 1991


In article <3433 at inews.intel.com>, bhoughto at pima.intel.com (Blair P. Houghton) writes:
> In article <5043 at goanna.cs.rmit.oz.au> ok at goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes:
> >Ah, I _see_.  Only people who are willing to rewrite all their old code
> >and make it non-portable to pre-ANSI systems (still in very wide use)
> >will benefit.  You know, you _could_ help people who have to maintain
> >old code by adding to your compiler an option to write prototypes
> >inferred from the definitions out to a file.

> Bad attitude, and a little misinformed.

No, not a whit misinformed.  I know all that stuff about ANSI C.
Because *compilation* as such was never the issue, I omit all the
points that Blair Houton made, they never were in doubt, and they
never were a propos.

I didn't say that the compiler wouldn't be able to generate the
right code.  We were *specifically* talking about Lint and replacements
for Lint, and my point was solely concerned with cross-module
consistency checks.  If the source files are correct, of COURSE an ANSI
compiler is going to generate the right object code for them without
the aid of prototypes.  The point is that the compiler in question is
intended to be so good at generating warning messages that it will be
an effective replacement for >Lint<, but it is not going to do cross-
module consistency checks.  To obtain that effect, you are going to
have to supply prototypes.  (In effect, a "lint-library" as generated
by lint _is_ a collection of prototypes.  Asking for the compiler to
produce a file of prototypes -- which some existing C compilers will
do -- is asking for no more than lint will already do.

You know, some people *do* have to check the consistency of their
C code with source files produced by others.  It may not do any good
to rewrite those other files, because (a) the original supplier may
issue a new version, and then you have it all to do again, and (b)
the reason for the original supplier not providing prototypes in the
first place may be that the code has to work on a range of machines
that still haven't got an ANSI-compliant compiler.

-- 
Seen from an MVS perspective, UNIX and MS-DOS are hard to tell apart.



More information about the Comp.lang.c mailing list