Path: utzoo!utgpu!water!watmath!clyde!rutgers!gatech!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: comp.lang.c Subject: Re: (So-called) ANSI C Message-ID: <1831@bsu-cs.UUCP> Date: 11 Jan 88 15:59:19 GMT References: <4668@pyr.gatech.EDU> <495@xyzzy.UUCP> <9930@mimsy.UUCP> <6996@brl-smoke.ARPA> <10027@ut-sally.UUCP> <1821@bsu-cs.UUCP> <4160@tut.cis.ohio-state.edu> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 22 I said: >>...while Turbo C will complain about >> if (a = getinput()) >>(and I think it ought to), it will not complain about the equivalent >> if ((a = getinput()) != 0) >>since you are making your intention clear, both to the human reader and >>to the compiler. I think Datalight C makes the same distinction. In article <4160@tut.cis.ohio-state.edu> lvc@tut.cis.ohio-state.edu (Lawrence V. Cipriani) expresses concern at this and concludes: >I disagree very strongly. This should not be restricted by the *compiler*. >...Use a separate program (or compile time option) to *check* for this. I should clarify--when I said "complain" I was talking about warning messages, and the user can specify whether or not he wants to see these and other warnings (e.g. unreachable code, variable declared but not used, etc). These do not inhibit compilation. They just point out suspicious situations. Turbo C is a good compiler. So is Datalight C; it was missing some library functions when I last checked, but I hear that's been fixed. -- Rahul Dhesi UUCP: !{iuvax,pur-ee,uunet}!bsu-cs!dhesi