From owner-freebsd-current Thu May 16 4:57: 1 2002 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 8E81E37B406; Thu, 16 May 2002 04:56:55 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id VAA11006; Thu, 16 May 2002 21:56:33 +1000 Date: Thu, 16 May 2002 21:58:56 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Akinori MUSHA Cc: Bill Fenner , , , , Subject: Re: moused(8): char signed-ness problem with gcc 3.1 In-Reply-To: <86k7q48h2w.wl@archon.local.idaemons.org> Message-ID: <20020516215731.K499-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 16 May 2002, Akinori MUSHA wrote: > [CC: obrien, who has been working on bringing in gcc 3.1] > > At Wed, 15 May 2002 20:46:06 -0700, > Bill Fenner wrote: > > So, who's gonna report it to gcc-bugs? knu?... > > > > int > > main() > > { > > unsigned char i = 127; > > char j; > > > > printf("%d\n", ((char)(i << 1))); > > j = ((char)(i << 1)) / 2; > > printf("%d\n", j); > > j = ((char)(i << 1)); > > printf("%d\n", j / 2); > > return 0; > > } > > Somehow, specifying -fsigned-char, which I thought was the default, > fixed the problem. So, the cause may be in our configuration of gcc? -fsigned-char doesn't fix it for me. Neither does repacling "char" by "signed char". moused is broken too. It assumes that plain chars are signed. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message