Article View: net.bugs
Article #285Bug in 4.2 lint argument parser.
From: Peter Klosky
Date: Thu, 23 Aug 1984 21:52
Date: Thu, 23 Aug 1984 21:52
25 lines
1653 bytes
1653 bytes
XXX
Here is a program file foo.c that calls pause() with three arguments;
no arguments are required, of course:
main(){ pause(1,2,3); }
The command "lint foo.c" reveals the fact that pause is called with
three arguments. This is due to a check against lint's set of
definitions of the standard C library.
The command "lint -I../includes foo.c" reveals no problems with the
program due to a bug in the argument parser that turns off checking
against the standard C library. The -I option should be passed to
the C preprocessor and have no other effect. The bug: the -I option
disables checking against the C library because it contains
the letter n. Had it contained the letter p, it would have switched
to checking against the portable C library definitions.
A glance at the driver SHELL in the lint directory shows that the
trouble is with the argument parser pattern matching. There are many
ways to fix the problem; if there is any interest we will post a
fix to the net. {allegra,seismo}!rlgvax!peter
--
Think snow!
Technical Details
Message-ID:
<71@rlgvax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!zehntel!hplabs!hao!seismo!rlgvax!peterShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 8/21/84; site rlgvax.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!zehntel!hplabs!hao!seismo!rlgvax!peter From: peter@rlgvax.UUCP (Peter Klosky) Newsgroups: net.bugs,net.bugs.4bsd Subject: Bug in 4.2 lint argument parser. Message-ID: <71@rlgvax.UUCP> Date: Thu, 23-Aug-84 17:52:22 EDT Article-I.D.: rlgvax.71 Posted: Thu Aug 23 17:52:22 1984 Date-Received: Sat, 25-Aug-84 07:01:34 EDT Distribution: net Organization: CCI Office Systems Group, Reston, VA Lines: 25