Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!caen.engin.umich.edu!ejd From: ejd@caen.engin.umich.edu (Edward J Driscoll) Newsgroups: comp.lang.c Subject: Re: lint won't verify printf formatting against variable types?? Keywords: lint, cc Message-ID: <441a30e5.8f55@fiero.engin.umich.edu> Date: 28 Jun 89 15:13:00 GMT References: <328@tree.UUCP> <417@siswat.UUCP> Reply-To: ejd@caen.engin.umich.edu (Edward J Driscoll) Organization: caen Lines: 30 In article <411@isadora.ikp.liu.se> hacker@isadora.ikp.liu.se (Goran Larsson [Hacker of Hackefors]) writes: >In article <105@borabora.omni.com> bob@omni.com (Bob Weissman) writes: >>Last week I spent an entire day tracking down one of those bugs you just >>don't see after staring at your code too long. It was of the form: >> >> if (condition); >> action; > >>My lint (SunOS 4.0.1 version) did not flag the extra semicolon. > >It isn't supposed to find this "error" as it is legal C. > It is legal, but I would hope for a warning from such an obvious semantic error. I don't use lint much, but Borland TC 2.0 will warn you about some *legal* constructs like "if(x = 5)". Oddly, I just tried it and it also lets "if(x==5);" get by without a peep. Oh well. >>I Hate C. > >I Love C ^^^^^^^^^^^---->me too -- Ed Driscoll The University of Michigan ejd@caen.engin.umich.edu