From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id f1BVCAAFjl/xRgAAWB0awg (envelope-from ) for ; Mon, 19 Oct 2020 17:28:32 -0400 Received: by simark.ca (Postfix, from userid 112) id 150D61EFBD; Mon, 19 Oct 2020 17:28:32 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 2DF5D1E58E for ; Mon, 19 Oct 2020 17:28:31 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 58E443857C4F; Mon, 19 Oct 2020 21:28:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 58E443857C4F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603142910; bh=4YBu+YEY637LRzEMYXd8UeTu1wunLhi2bywAV+D+bqY=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=gS4+6jxXyBG7hnxuQnLXjAeG2MvoJOYreZPVX/BMVE0WkuDfuCu3g4JdlvPc6a+21 /mg95M/dfDDFAL6fie3vvmp5iPFuWKV2SCRd/2ZHSQXR+kWgZc5HRnI7g5jX2ZF4rE TCDSVGcCnEPEPbZg1VujjjyDUKOitSJNxbSclrOs= Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by sourceware.org (Postfix) with ESMTPS id E2EE73857C4F for ; Mon, 19 Oct 2020 21:28:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E2EE73857C4F Received: by mail-qk1-x742.google.com with SMTP id f21so996542qko.5 for ; Mon, 19 Oct 2020 14:28:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4YBu+YEY637LRzEMYXd8UeTu1wunLhi2bywAV+D+bqY=; b=Igc25FFaQPB1No6Tb9Hc/QJyQoJ/IQ7LA/7emXLY5+A1NQCieatfqlVkI5WxQnO4bU zOkeFHgzEoTt3HnTfhXGQuz5+mpBtQA2maOx3eg/2vztujy7WMKpnYp+/Xf8Ox8WJiw2 IjkHW/Kgq+VHFgK6kcMMrpNr55UAJJjE7pv++Qj90aJujXQSkUuf04ORYq4PvRVA3ShU jXnevthmaZcUR0H5/SVVMeLdy6Awg2jaUos/wV33cUueeBJWfq3srYEB8rvjgnDqrqMD yUSn5kSY9Tzr+RTpH7mATlROPOiWo30113i7O633bAanZo3kYeEPmX39iTJYYQDfEmHX MGBg== X-Gm-Message-State: AOAM5323gyEJLCB4gNfNE7oEid0uDyihgoaRKPPkkDrEgR+3y5hsgf9P xiFuS/IRAl+huPia3WwgtIjKx3+lbJBZaw== X-Google-Smtp-Source: ABdhPJx8WA6r6gYzpUV+5FpJZ96siytp5NRlQrx46ISwFJTZnfQFL/T0Jsr0SMtA2pWUAvmks5bFtQ== X-Received: by 2002:ae9:e710:: with SMTP id m16mr1521191qka.13.1603142907261; Mon, 19 Oct 2020 14:28:27 -0700 (PDT) Received: from ?IPv6:2804:7f0:8283:fe4b:38a0:82a3:b1fc:db00? ([2804:7f0:8283:fe4b:38a0:82a3:b1fc:db00]) by smtp.gmail.com with ESMTPSA id z26sm529812qki.40.2020.10.19.14.28.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Oct 2020 14:28:26 -0700 (PDT) Subject: Re: [PATCH] Don't inherit range-type signed-ness from underlying type To: Tom Tromey , gdb-patches@sourceware.org References: <20201019193330.3242805-1-tromey@adacore.com> Message-ID: Date: Mon, 19 Oct 2020 18:28:24 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201019193330.3242805-1-tromey@adacore.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Luis Machado via Gdb-patches Reply-To: Luis Machado Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Hi, On 10/19/20 4:33 PM, Tom Tromey wrote: > A recent commit changed gdb to inherit the signed-ness of a range type > from its underlying type: > > commit cfabbd351a174406fd5aa063303f5c8bf9266bbc > Author: Tom Tromey > Date: Sat Oct 17 11:41:59 2020 -0600 > > Make range types inherit signed-ness from base type > > This passed testing -- but unfortunately, additional testing at > AdaCore showed that this change was incorrect. GNAT, at least, can > emit an unsigned range type whose underlying type is signed. Is this correct compiler behavior though? It sounds inconsistent. If the compiler wants an unsigned type for a range, intuitively it should use an unsigned base type, no? Otherwise this may lead to confusion.