Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!husc6!think!ames!oliveb!sun!gorodish!guy From: guy%gorodish@Sun.COM (Guy Harris) Newsgroups: comp.lang.c Subject: Re: Portability check in lint Message-ID: <23575@sun.uucp> Date: Wed, 15-Jul-87 18:53:24 EDT Article-I.D.: sun.23575 Posted: Wed Jul 15 18:53:24 1987 Date-Received: Sat, 18-Jul-87 01:39:45 EDT References: <949@oakhill.UUCP> Sender: news@sun.uucp Lines: 44 Keywords: lint portability > I noticed that in the latest release of Sun 3 software which we have (I > believe it is 3.2), there is no -p option for lint to perform portability > checks. This option does exist, however, in the System V version of lint > presumably distributed with the Sun 3.2 software. The "-p" option is, in fact, supplied with the System V version of "lint", but not with the 4.2 version. > Did Berkeley lint (if there is such a thing) ever have this option, was > it excised for some reason, or what? Yes, there is a version of "lint" that comes with 4BSD; in fact, there was a version of "lint" that came with V7. Both those versons have the option. > I am just curious, as I consider the constraints of eight character > symbol names (six characters external) as somewhat of an anachronism > portability-wise, but I could well be wrong. I suspect this may be why the "-p" was excised at Sun (I don't know for sure, it happened before I joined). The trouble with "lint -p" is that it's *too* strict for most uses. It checks for compatibility with some old IBM 370 and GCOS dialects of C; this is why the the 6-character *one-case* external symbol name restriction is imposed. Furthermore, instead of checking against the "lint" library for the standard C library, it checks against some small library that presumably represents the intersection of the libraries available under the C implementations at Bell Labs. (The version that comes with the S5 "lint" seems larger than the version that comes with the V7 and 4BSD "lint"s. I don't know whether this reflects additions to the OS or GCOS versions of the C library subsequent to the release of V7, or not.) The trouble is that there are some checks, performed only by "lint -p", that are useful when porting to other UNIX implementations, but specifying "-p" performs stricter checks than are useful when testing for portability to UNIX C implementations (or even to other modern C implementations). There really needs to be an option intermediate in stringency between "lint" and "lint -p"; "lint -p" itself is of limited use. Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com