Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!mit-eddie!uw-beaver!uw-june!uw-entropy!dataio!bright From: bright@dataio.Data-IO.COM (Walter Bright) Newsgroups: comp.sys.ibm.pc Subject: Re: 2 bugs in Turbo C Message-ID: <1322@dataio.Data-IO.COM> Date: Thu, 18-Jun-87 14:05:14 EDT Article-I.D.: dataio.1322 Posted: Thu Jun 18 14:05:14 1987 Date-Received: Sun, 21-Jun-87 14:12:43 EDT References: <2879@zen.berkeley.edu> <3320022@hpsrlc.HP.COM> Reply-To: bright@dataio.UUCP (Walter Bright) Organization: Data I/O - FutureNet Corp., Redmond, WA Lines: 24 In article <3320022@hpsrlc.HP.COM> darrylo@hpsrlc.HP.COM (Darryl Okahata) writes: >Even with the bugs it has (the ones above don't bother me as patches have >been issued), I like Turbo C (the compile speed is WONDERFUL). Having >warnings like "possibly incorrect assignment" in an "if" statement (should >be equality, not assignment) is really nice! Datalight C has been issuing this warning for the last year and a half. It will also issue the same warning on things like: while (a = b) ... and on d = a && b = c; ... Basically, the warning is given whenever an assignment is implicitly tested for 0 or !=0. To get rid of the warning, compile with -w or: while ((a = b) != 0) ... and d = a && (b = c) != 0; This will also flag to the person maintaining your code that you really did mean the assignment. Disclaimer: I have no connection with Datalight other than the fact that I wrote the compiler and receive money from sales of it.