From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126218 invoked by alias); 17 Nov 2015 17:33:42 -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 126207 invoked by uid 89); 17 Nov 2015 17:33:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: ausxippc110.us.dell.com Received: from AUSXIPPC110.us.dell.com (HELO ausxippc110.us.dell.com) (143.166.85.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Tue, 17 Nov 2015 17:33:41 +0000 X-LoopCount0: from 10.175.216.250 From: To: CC: , , Subject: Re: [PATCH 0/2] Fix invalid left shift of negative value. Date: Tue, 17 Nov 2015 17:33:00 -0000 Message-ID: <780E2D34-AC5A-4054-BA78-D9DBADFD6F6E@dell.com> References: <20151110154243.43d38f49@pinnacle.lan> <20151111172327.383F51407@oc7340732750.ibm.com> <20151111122708.69c496d3@pinnacle.lan> <20151116220950.1e0f4a89@pinnacle.lan> <564B3609.6040008@redhat.com> In-Reply-To: <564B3609.6040008@redhat.com> Content-Type: text/plain; charset="Windows-1252" Content-ID: <69BE0C498CA3EF4B8387A46687EB9E23@dell.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00349.txt.bz2 > On Nov 17, 2015, at 9:13 AM, Pedro Alves wrote: >=20 > On 11/17/2015 05:09 AM, Kevin Buettner wrote: >=20 >> ... >> 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? >=20 > Can't think of one. Agreed. One's complement is seriously obsolete. I can't think of any arch= itecture in current use (in actual hardware) that uses it. You can of cour= se easily find any number of examples supported in simulators like SIMH, bu= t that isn't significant. None of those are likely to become GDB targets. >> 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. >>=20 >> 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. >=20 > Agreed. If someone wants to port gdb to such a host, then we can > worry about it then. I remember reading a claim that C requires two's complement (at least ANSI = C), so it's not likely that this will ever happen, and if it does, GDB will= be the least of the port developer's worries. paul