Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!orsvax1!pyrnj!caip!lll-crg!seismo!mcvax!cernvax!jmg From: jmg@cernvax.UUCP (jmg) Newsgroups: net.micro.cbm Subject: C-Power 2.9 / Trim bug Message-ID: <283@cernvax.UUCP> Date: Mon, 3-Mar-86 06:27:19 EST Article-I.D.: cernvax.283 Posted: Mon Mar 3 06:27:19 1986 Date-Received: Wed, 5-Mar-86 04:26:27 EST Reply-To: jmg@cernvax.UUCP (Mike Gerard, DD Division, CERN.) Organization: CERN, Geneva/Switzerland Lines: 26 Keywords: C Maybe this problem is known across the water, but it caused me pain and suffering, not to mention complaints from the family that I was on that bl--dy computer again. Anyway, with Trim as distributed on my C-power version 2.9 compiler it seems that the statement if (!(bitval & 1)) goes the wrong way when bitval (an int) is hex 100, 200, 400 etc. Some of you could verify it with main() { int bitval; char bit; for (bit=0 ; bit<15 ; bit++) { printf("bit = %2d, bitval = %4x\n",bit,bitval); if (!(bitval & 1)) printf("!(%4x & 1) = %4x is true\n",bitval,!(bitval & 1)); else printf("!(%4x & 1) = %4x is false\n",bitval,!(bitval & 1)); } } It is correct before trimming, wrong after! Also, does anyone know the exact circumstances under which one gets a syntax error for something like i = x[j = y];