Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.lang.c Subject: Re: Re: How to let lint check your format strings Message-ID: <2113@sun.uucp> Date: Thu, 11-Apr-85 01:55:18 EST Article-I.D.: sun.2113 Posted: Thu Apr 11 01:55:18 1985 Date-Received: Sat, 13-Apr-85 03:56:50 EST References: <558@mcvax.UUCP> <1582@ukma.UUCP> <518@lll-crg.ARPA> Organization: Sun Microsystems, Inc. Lines: 13 > The idea of having lint use constant format strings to check types and > arg counts is a great one. I have wanted to do this for many years as > argument types and counts for printf and its buddies are one of my more > frequent errors. Could we come up with a system that does not require any > includes or modifications to the code to do it? This would be great! Somebody did - AT&T to be specific. The system is called "UNIX System V Release 2". "lint" was enhanced with a /*PRINTFLIKE*/ pragma; it's like /*VARARGS*/, only it declares the routine as being like "printf". The argument list is checked against the format string. Guy Harris sun!guy