Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!lll-crg.llnl.gov From: berry@lll-crg.llnl.gov (Berry Kercheval) Newsgroups: comp.lang.c Subject: Re: lint won't verify printf formatting against variable types?? Keywords: lint, cc Message-ID: <27762@lll-winken.LLNL.GOV> Date: 29 Jun 89 20:17:10 GMT References: <328@tree.UUCP> <417@siswat.UUCP> <441a30e5.8f55@fiero.engin.umich.edu> <27729@lll-winken.LLNL.GOV> <2271@trantor.harris-atd.com> Sender: usenet@lll-winken.LLNL.GOV Reply-To: berry@lll-crg.llnl.gov (Berry Kercheval) Organization: Lawrence Livermore National Laboratory Lines: 24 In-reply-to: bbadger@x102c.harris-atd.com (Badger BA 64810) In article <2271@trantor.harris-atd.com>, bbadger@x102c (Badger BA 64810) writes: >In article <27729@lll-winken.LLNL.GOV> berry@lll-crg.llnl.gov (Berry Kercheval) writes without thinking....: >>constructs. This is NOT an "obvious" semantic error. > >Give the guy a break -- he didn't say he expected ``cc'' to catch it, he >just hoped that ``lint'' would. That's lint's job: finding *legal* constructs >which aren't portable or probably aren't what was intended. Yeah, you're right. I focused on the 'useless null statement' and didn't consider when it's useful and when it isn't. Of course, I figured this out on the way home last night when it was too late... Just to save myself anymore angry mail telling me how stupid I was, let me summarize what we seem to agree on: "if( expr );" is useless, but legal, and a case can be made for issuing a warning if it's detected, but it should not be forbidden. OK? --berry