Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!sun!guy From: guy@sun.UUCP Newsgroups: net.lang.c Subject: Re: having "lint" check "printf" args (was Re: C Builtin Funxions) Message-ID: <3622@sun.uucp> Date: Fri, 2-May-86 14:05:58 EDT Article-I.D.: sun.3622 Posted: Fri May 2 14:05:58 1986 Date-Received: Sun, 4-May-86 05:20:13 EDT References: <2524@brl-smoke.ARPA> <2554@utcsri.UUCP> <3186@ukma.UUCP> <6889@boring.UUCP> Organization: Sun Microsystems, Inc. Lines: 17 > I've also heard that system 5 lint has (checking that the args to "printf" > match the control string) built-in; there's even a directive > /*PRINTFLIKE*/ so you can define your own. Unfortunately, it doesn't. The "lint" library uses the directive, but the "lint" processor doesn't implement it. I've been tempted to implement it when I have the time; my notion was to have pass 1 parse character string arguments and, if it discovers an argument which is a valid "printf" control string (and isn't valid by being a trivial control string with no "%" items), it puts a list of the expected argument types out in the file it hands to pass 2. It would also not bother parsing subsequent character string arguments. -- Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.arpa