From owner-freebsd-current Thu May 16 4:31:27 2002 Delivered-To: freebsd-current@freebsd.org Received: from mail.musha.org (daemon.musha.org [218.44.187.2]) by hub.freebsd.org (Postfix) with ESMTP id 0662837B401; Thu, 16 May 2002 04:31:20 -0700 (PDT) Received: from archon.local.idaemons.org (archon.local.idaemons.org [192.168.1.32]) by mail.musha.org (Postfix) with ESMTP id 8B7664D801; Thu, 16 May 2002 20:31:18 +0900 (JST) Date: Thu, 16 May 2002 20:31:19 +0900 Message-ID: <86k7q48h2w.wl@archon.local.idaemons.org> From: "Akinori MUSHA" To: Bill Fenner Cc: obrien@FreeBSD.org, rivers@dignus.com, audit@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: moused(8): char signed-ness problem with gcc 3.1 In-Reply-To: <200205160346.UAA27116@windsor.research.att.com> References: <200205160346.UAA27116@windsor.research.att.com> User-Agent: Wanderlust/2.9.11 (Unchained Melody) SEMI/1.14.3 (Ushinoya) LIMIT/1.14.7 (Fujiidera) APEL/10.3 MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386--freebsd) Organization: Associated I. Daemons X-PGP-Public-Key: finger knu@FreeBSD.org X-PGP-Fingerprint: 081D 099C 1705 861D 4B70 B04A 920B EFC7 9FD9 E1EE MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") 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 [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 - yes - it seems gcc 3.1 does have a problem... > > Indeed - easily determined by breaking down the expression. > > 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? I'll send-pr if it isn't. -- / /__ __ Akinori.org / MUSHA.org / ) ) ) ) / FreeBSD.org / Ruby-lang.org Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp "Somewhere out of a memory.. of lighted streets on quiet nights.." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message