[net.lang.c] having "lint" check "printf" args

guy@sun.UUCP (05/02/86)

> 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 "%<whatever>" 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