Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Definition of boolean type Message-ID: <9768@smoke.BRL.MIL> Date: 2 Mar 89 14:58:29 GMT References: <10@dbase.UUCP> <1989Feb10.092449.20875@sq.uucp> <6849@pogo.GPID.TEK.COM> <9753@smoke.BRL.MIL> <2892@nunki.usc.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 12 In article <2892@nunki.usc.edu> jeenglis@nunki.usc.edu (Joe English) writes: -gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: ->That's pretty strange -- "if(x)" means no more and no less than ->"if x is nonzero", which nearly all instruction sets support directly. ->It's easy to imagine a dumb compiler that produces MORE code for ->"if(x!=0)" but not one that produces LESS code. -If I recall correctly, it generated the same amount of code -for "if(x)" and "if(x!=0)," but it went something like: I can also believe that a compiler would produce exactly same code for "if(x)" and "if(x!=0)", even if it's horrible code in both cases. I still wonder how one could get WORSE code for "if(x)", though.