lint won't verify printf formatting against variable types??
Knudsen
knudsen at ihlpl.ATT.COM
Tue Jul 4 03:42:27 AEST 1989
In article <411 at isadora.ikp.liu.se>, hacker at isadora.ikp.liu.se (Goran Larsson [Hacker of Hackefors]) writes:
> It's your own fault -- you should have written it as
> if ( condition ) {
> action;
> }
> to reduce the risk of errors!
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.
--
Mike Knudsen Bell Labs(AT&T) att!ihlpl!knudsen knudsen at ihlpl.att.com
Round and round the while() loop goes;
"Whether it stops," Turing says, "no one knows!"
Shotguns -- just say PULL!
More information about the Comp.lang.c
mailing list