Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: == vs = Message-ID: <1988Feb7.003654.632@utzoo.uucp> Organization: U of Toronto Zoology References: <11523@brl-adm.ARPA> <1202@eneevax.UUCP> <8836@ism780c.UUCP> <2006@rti.UUCP>, <3610@sdcc6.ucsd.EDU> Date: Sun, 7-Feb-88 00:36:48 EST > To reiterate, compilers should not complain about style, only about > marginally legal statements. The trouble is that the boundary is fuzzy here. Me, I want the compiler to tell me when I've done something wrong and keep quiet when I've done something right, but the definitions of "wrong" and "right" are tricky and not necessarily the same for everyone. What I decided, when faced with a similar situation once, was to have two classes of such messages: warnings and quibbles. Warnings were for things that were likely to be errors; they were on by default but could be turned off. Quibbles were for things that were odd but not necessarily wrong; they were available on request but not by default. The choice *is* a judgement call in some cases, and depends slightly on your user community. > if (x = y) foo(); > > while (foo() > 0); > bar(); > > i = 1<