Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!csd4.milw.wisc.edu!lll-winken!xanth!mcnc!duke!bet From: bet@bent (Bennett Todd) Newsgroups: comp.lang.c Subject: Re: Usual arithmetic conversions Keywords: sizeof unsigned ouch Message-ID: <14731@duke.cs.duke.edu> Date: 12 Jun 89 17:55:06 GMT References: <308@donk.UUCP> <1702@auspex.auspex.com> Sender: news@duke.cs.duke.edu Reply-To: bet@bent (Bennett Todd) Organization: Diagnostic Physics, Raddiology, DUMC Lines: 16 In-reply-to: guy@auspex.auspex.com (Guy Harris) In article <1702@auspex.auspex.com>, guy@auspex (Guy Harris) writes: >>Don't you just hate it when code that has been working for years >>suddenly goes bad on you? This took a few merry hours to find: > >"lint" probably would have taken less time to find it; it checks for >comparisons such as "unsigned >= 0". I used to use lint meticulously. Then I started using ANSI style C. Anybody got an ANSI supporting version of lint handy? GCC using -Wall is better than lint for some kinds of warning messages, but that particular special case in degenerate booleans isn't among the things it knows to check for (at least the version I am using, 1.34). Maybe I should bring up agcpp after all.... -Bennett bet@orion.mc.duke.edu