Article View: gnu.gcc.help
Article #51331Re: What does the gnu world use for lint?
From: Joe Buck
Date: Fri, 04 Jun 1993 21:04
Date: Fri, 04 Jun 1993 21:04
31 lines
2072 bytes
2072 bytes
In article <1993Jun4.110115.8333@cas.org> lvirden@cas.org (Larry W. Virden) writes:
>These suggestions are only true if you plan on compiling all the pieces of
>your program together each time you do a compile . Many folk use libraries,
>and thus find it extremely difficult to get good warnings about arguments
>passed to various functions, etc.
No, gcc can make every check that lint can make if you require that there
be a prototype in an .h file for every library function used. For this
reason, lint is pretty much going away.
>Lint allows one to build libraries of arguments and return codes for functions
>so as to not have to compile so much at one time.
A lint library looks very much like a prototype and provides no extra
information about a function that a prototype does not provide. If your
vendor provides a lint library but no prototypes, you can probably convert
the lint library to a set of prototypes. To make sure that nothing
escapes your notice, use the following gcc switch:
`-Wstrict-prototypes'
Warn if a function is declared or defined without specifying the
argument types. (An old-style function definition is permitted
without a warning if preceded by a declaration which specifies
the argument types.)
--
Joe Buck jbuck@ohm.EECS.Berkeley.EDU
Technical Details
Message-ID:
<1uodc5$qff@agate.berkeley.edu>Path:
arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!usenet.ins.cwru.edu!agate!messier.eecs.berkeley.edu!jbuckReferences:
<1um0us$o5l@urmel.informatik.rwth-aachen.de> <1993Jun4.095446.15806@arb-phys.uni-dortmund.de> <1993Jun4.110115.8333@cas.org>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,3a5fa441bd983d3 X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-06-04 14:09:33 PST Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!usenet.ins.cwru.edu!agate!messier.eecs.berkeley.edu!jbuck From: jbuck@messier.eecs.berkeley.edu (Joe Buck) Newsgroups: gnu.gcc.help Subject: Re: What does the gnu world use for lint? Date: 4 Jun 1993 21:04:05 GMT Organization: U. C. Berkeley Lines: 31 Message-ID: <1uodc5$qff@agate.berkeley.edu> References: <1um0us$o5l@urmel.informatik.rwth-aachen.de> <1993Jun4.095446.15806@arb-phys.uni-dortmund.de> <1993Jun4.110115.8333@cas.org> NNTP-Posting-Host: messier.eecs.berkeley.edu Keywords: alint lint