Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!uflorida!novavax!twwells!bill From: bill@twwells.com (T. William Wells) Newsgroups: comp.lang.c Subject: Re: lint won't verify printf formatting against variable types?? Keywords: lint, cc Message-ID: <1989Jul4.042350.11064@twwells.com> Date: 4 Jul 89 04:23:50 GMT References: <328@tree.UUCP> <417@siswat.UUCP> <105@borabora.omni.com> <411@isadora.ikp.liu.se> <11038@ihlpl.ATT.COM> Organization: None, Ft. Lauderdale, FL Lines: 19 In article <11038@ihlpl.ATT.COM> knudsen@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@twwells.com