Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!news.cs.indiana.edu!spool.mu.edu!munnari.oz.au!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: lint (was: Funny mistake) Message-ID: <5069@goanna.cs.rmit.oz.au> Date: 26 Mar 91 10:07:17 GMT Article-I.D.: goanna.5069 References: <13619@helios.TAMU.EDU> <13627@helios.TAMU.EDU> <3433@inews.intel.com> Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 39 In article <3433@inews.intel.com>, bhoughto@pima.intel.com (Blair P. Houghton) writes: > In article <5043@goanna.cs.rmit.oz.au> ok@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.