C Builtin Funxions

Guido van Rossum guido at boring.uucp
Fri Apr 25 11:04:57 AEST 1986


In article <3186 at ukma.UUCP> david at ukma.UUCP (David Herron, NPR Lover) writes:
>>[plea for lint to check printf formats]
>Ok, there *is* a way to do this.  One of the europeans (that guy that 
>had been doing Hack) posted a tool for aiding lint last year sometime.
>[rough explanation of the idea]

This code is still available; I can mail it to interested parties.  The
author is called Andries Brouwer (and currently not at our institute but
in Denmark).  I've also heard that system 5 lint has this built-in;
there's even a directive /*PRINTFLIKE*/ so you can define your own.

>>... The following is a borderline case:
>>        printf( c<' '|| c>'\176'? "\\%3o":"%c", c);
>I dunno what it would do with this case...

It gives up here.  There is a limit to what you can check.

>One thing that occurs to me... do char's always get casted to ints
>when they're arguments to functions?????

Yes, definitely.  And so do shorts.  This is supposed to be standard
knowledge amongst posters to this group!  (At least posters that answer
questions.)

-- 
	Guido van Rossum, CWI, Amsterdam <guido at mcvax.UUCP>



More information about the Comp.lang.c mailing list