Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!wuarchive!julius.cs.uiuc.edu!apple!portal!cup.portal.com!Bits_of_Magic From: Bits_of_Magic@cup.portal.com Newsgroups: comp.sys.amiga.tech Subject: Bug in Lattice C 5.04 (IBM host) Message-ID: <33535@cup.portal.com> Date: 4 Sep 90 20:56:07 GMT References: <^*}%^D+@masalla.fulcrum.bt.co.uk> Organization: The Portal System (TM) Lines: 21 I found a major bug in Lattice C 5.04 for the IBM host, which is supposed to be identical to the native version, but I guess not. The bug: LONG value; switch (value) { case 0: DoSomething(); break; case 0x100000000 DoFoo(); break; } whether value is 0 or 100000000, DoSomething() executes. When I looked at a disassembly from OMD, it was clear that in the 2nd case, the code was checking for equality to 0! I am going to call Lattice about this, and will post further afterwards. Nicky Robinson