Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!ncc!myrias!mj From: mj@myrias.uucp (Michal Jaegermann) Newsgroups: comp.sys.atari.st Subject: Sozobon C fix - comparison with constants on the left Message-ID: <615484204.7592@myrias.uucp> Date: 3 Jul 89 15:50:03 GMT Organization: Myrias Research, Edmonton Lines: 42 Thanks to information from Hans Ruegg, who told me where to look, here is a fix for a hcc problem No2 on Hans's list ( bad comparisons with constants on the left). This doesn't help a bit with a faulty comparison of constants only ( i.e. compiler claims that 2 >= 3 and 3 <=2), but I hope that you can live with that for a while. BTW - strict inequalities between constants return correct results. If a need will arise, feed this article to patch and recompile. *** hcc\p2_c.old --- hcc\p2.c ************** *** 649,658 int newtok; switch (np->e_token) { ! case LTEQ: newtok = '>'; break; ! case GTEQ: newtok = '<'; break; ! case '<': newtok = GTEQ; break; ! case '>': newtok = LTEQ; break; default: return; } --- 649,658 ----- int newtok; switch (np->e_token) { ! case '<': newtok = '>'; break; ! case '>': newtok = '<'; break; ! case LTEQ: newtok = GTEQ; break; ! case GTEQ: newtok = LTEQ; break; default: return; } --- Michal Jaegermann Myrias Research Corporation Edmonton, Alberta, CANADA ...{ncc,alberta}!myrias!mj