Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!agate!violet.berkeley.edu!jerry From: jerry@violet.berkeley.edu ( Jerry Berkman ) Newsgroups: comp.lang.fortran Subject: Re: fortran lint? Message-ID: <10947@agate.BERKELEY.EDU> Date: 14 Jun 88 23:24:56 GMT References: <3835@pasteur.Berkeley.Edu> <20089@beta.UUCP> <1059@ima.ISC.COM> <20282@beta.UUCP> Sender: usenet@agate.BERKELEY.EDU Organization: University of California, Berkeley Lines: 37 In article <20282@beta.UUCP> jlg@beta.UUCP (Jim Giles) writes: >In article <1059@ima.ISC.COM>, johnl@ima.ISC.COM (John R. Levine) writes: >> >> I have used systems in which the compiler places into object >> files information about argument types, and the linker can report mismatches. > >This seems like exactly what I said: The COMPILER can't check! IBM's VS FORTRAN compiler can check. E.g.: FORTVS UTILS ( ICA(UPDATE(UTILDEC))) compiles the source in UTILS FORTRAN creating binary UTILS TEXT and creating UTILDEC ICA which has all the declaration info in an internal format. Then if you compile further source by: FORTVS PROG ( ICA(USE(UTILDEC))) all calls in PROG are checked against the subroutine declarations stored in UTILDEC ICA. In this manner, a vendor can supply object and ICA files without supplying source, and VS FORTRAN can check usage across separate compiles. It checks number and type of arguments, number of dimensions of an array argument, etc. I hope to see similar tools come out of TOOLPACK and from other FORTRAN compiler vendors in the future. >Seperately compiled usually means that the compile >is being performed in the absence of other source (the rest of the code >is, or will be, available ONLY as '*.o' files). Lint is of little >help in this case. > >J. Giles >Los Alamos The "-C" option of lint creates "lint libraries" so that separately compiled C procedure calls can be checked against C procedure declarations in the absence of source. - Jerry Berkman Computing Services, U.C. Berkeley, (415)642-4804 jerry@violet.berkeley.edu