lint won't verify printf formatting against variable types??

Berry Kercheval berry at lll-crg.llnl.gov
Fri Jun 30 06:17:10 AEST 1989


In article <2271 at trantor.harris-atd.com>, bbadger at x102c (Badger BA 64810) writes:
>In article <27729 at lll-winken.LLNL.GOV> berry at lll-crg.llnl.gov (Berry Kercheval) writes without thinking....:
>>constructs.  This is NOT an "obvious" semantic error.  
>
>Give the guy a break -- he didn't say he expected ``cc'' to catch it, he 
>just hoped that ``lint'' would.  That's lint's job: finding *legal* constructs
>which aren't portable or probably aren't what was intended.


Yeah, you're right.  I focused on the 'useless null statement' and
didn't consider when it's useful and when it isn't.  Of course, I
figured this out on the way home last night when it was too late...

Just to save myself anymore angry mail telling me how stupid I was, let me
summarize what we seem to agree on:

	"if( expr );" is useless, but legal, and a case can be made for
	issuing a warning if it's detected, but it should not be forbidden.

OK?

  --berry

	



More information about the Comp.lang.c mailing list