From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111576 invoked by alias); 17 Nov 2015 14:13:34 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 111566 invoked by uid 89); 17 Nov 2015 14:13:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 17 Nov 2015 14:13:32 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id ADEDD12BE0; Tue, 17 Nov 2015 14:13:31 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tAHEDTix027079; Tue, 17 Nov 2015 09:13:30 -0500 Message-ID: <564B3609.6040008@redhat.com> Date: Tue, 17 Nov 2015 14:13:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Kevin Buettner , gdb-patches@sourceware.org CC: Dominik Vogt Subject: Re: [PATCH 0/2] Fix invalid left shift of negative value. References: <20151110154243.43d38f49@pinnacle.lan> <20151111172327.383F51407@oc7340732750.ibm.com> <20151111122708.69c496d3@pinnacle.lan> <20151116220950.1e0f4a89@pinnacle.lan> In-Reply-To: <20151116220950.1e0f4a89@pinnacle.lan> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-11/txt/msg00340.txt.bz2 On 11/17/2015 05:09 AM, Kevin Buettner wrote: > I came across this comment in defs.h: > > /* Defaults for system-wide constants (if not defined by xm.h, we fake it). > FIXME: Assumes 2's complement arithmetic. */ > (side note, the xm.h is gone since 2007..) > Is this something that we really want to fix? Can anyone think of a > host which can't run GDB (and upon which we'd like to run GDB) due the > fact that it uses something other than the two's complement > representation for signed integers? Can't think of one. > My opinion: Assumptions about two's complement in GDB should not be > fixed. I can't think of any architecture that I'd care to use which > uses something other than two's complement. My limited research on > the matter shows that really archaic machines used one's complement or > signed magnitude representations. > > If we all agree that this is something we don't want to fix, then I > think we should remove that FIXME and assert somewhere that GDB is > expected to be hosted on platforms which use two's complement > representation for signed integers. Agreed. If someone wants to port gdb to such a host, then we can worry about it then. Thanks, Pedro Alves