Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!keith From: keith@Apple.COM (Keith Rollin) Newsgroups: comp.sys.mac.programmer Subject: Re: Another MPW C 3.2final bug. Message-ID: <54265@apple.Apple.COM> Date: 24 Jun 91 03:13:41 GMT References: <1991Jun21.163520.22236@techbook.com> Organization: Apple Computer Inc., Cupertino, CA Lines: 38 In article <1991Jun21.163520.22236@techbook.com> larryh@techbook.com (Larry Hutchinson) writes: > > >Following is the text of yet another bug report for MPW C 3.2 final. >I have decided that 3.2f is too buggy to use and am reverting to >the less buggy 3.2b6. Gack! > > >*********************************** > > >The following code: > >#define CLOSE_DELTA 5 >int AbsInt(int); > >static int >IsClose(Point p1,Point p2) >{ > return !( (AbsInt(p1.h-p2.h) > CLOSE_DELTA) | > (AbsInt(p1.v-p2.v) > CLOSE_DELTA) ); >} > >Produces the following incorrect code. > [ buggy object code delete ] If you use a logical or (||) instead of bitwise (|), it seems to generate correct code. -- ------------------------------------------------------------------------------ Keith Rollin --- Apple Computer, Inc. INTERNET: keith@apple.com UUCP: {decwrl, hoptoad, nsc, sun, amdahl}!apple!keith "But where the senses fail us, reason must step in." - Galileo