Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!koosh!bob From: bob@omni.com (Bob Weissman) Newsgroups: comp.lang.c Subject: Re: lint won't verify printf formatting against variable types?? Summary: while != if Keywords: lint, cc Message-ID: <115@borabora.omni.com> Date: 29 Jun 89 17:20:53 GMT References: <328@tree.UUCP> <417@siswat.UUCP> <27729@lll-winken.LLNL.GOV> Organization: OMNI Solutions, Los Altos, CA Lines: 29 In article <27729@lll-winken.LLNL.GOV>, berry@lll-crg.llnl.gov (Berry Kercheval) writes: > In article <441a30e5.8f55@fiero.engin.umich.edu>, ejd@caen (Edward J Driscoll) writes: > >It [[ if(x==5); ]]is legal, but I would hope for a warning from such an > > obvious semantic error. > > Goodness, save me from useless warnings for perfectly good C > constructs. This is NOT an "obvious" semantic error. Have you never > done something like this? > > /* skip to end of word */ > while(!isspace(*cp++)); Sorry, but "while" is quite different from "if". I'm not talking about random_keyword (expression); I'm talking about if (expression); which, while legal, *never* makes sense semantically, as it is always equivalent to expression; OK? -- Bob Weissman Domainish: bob@omni.com UUCPish: ...!{amdahl,apple,pyramid,tekbspa,uunet}!koosh!bob