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

T. William Wells bill at twwells.com
Tue Jul 4 14:23:50 AEST 1989


In article <11038 at ihlpl.ATT.COM> knudsen at ihlpl.ATT.COM (Knudsen) writes:
: Yes, but suppose you make the same typo and get
:       if ( condition ); {     /* extra semicolon */
:               action;
:       }
:
: Isn't this still legal C (with the same bug), since compound blocks
: may be started anywhere?
: I can see always using the { } in case you want to add more statements
: later, but I don't see where it avoids the original type bug.

It avoids the bug because, if you always use braces, putting a
semicolon in that place is just not one of the typos you'll do.
Consider the hand movement necessary to do that and you'll see
what I mean.

---
Bill                    { uunet | novavax | ankh | sunvice } !twwells!bill
bill at twwells.com



More information about the Comp.lang.c mailing list