An interesting behaviour in printf

Joe Dellinger joe at hanauma.stanford.edu
Mon Mar 20 18:06:14 AEST 1989


	Ooops. I realized my mistake about 1 minute after I
posted, but it seems our news server is hyperactive and had
already spread my errant article far and wide by then....

	My posting DOES raise an important question, though,
which I believe hasn't been addressed in any of the responses.
I ran my program through lint with no complaint. Why doesn't "lint"
catch this sort of error? And yes, I know, lint can't be expected
to know the internal details of weird varargs programs...

	BUT, printf is hardly "weird". It gets used ALL the time.
Why did the creators of lint not tackle error checking for all the
varargs programs in the standard libraries? Will "ANSI Lint" solve
this problem? If no, why not? It seems there is no better reason
than laziness...
\    /\    /\    /\/\/\/\/\/\/\.-.-.-.-.......___________
 \  /  \  /  \  /Dept of Geophysics, Stanford University \/\/\.-.-....___
  \/    \/    \/Joe Dellinger joe at hanauma.stanford.edu  apple!hanauma!joe\/\.-._



More information about the Comp.lang.c mailing list