From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x12e.google.com (mail-il1-x12e.google.com [IPv6:2607:f8b0:4864:20::12e]) by sourceware.org (Postfix) with ESMTPS id BCCF6385B190 for ; Mon, 28 Nov 2022 14:18:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BCCF6385B190 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-il1-x12e.google.com with SMTP id m15so5059770ilq.2 for ; Mon, 28 Nov 2022 06:18:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=ELRRWbl++s+i+fBqCpMabNbs3DbpzvW1uIgibqd7VEI=; b=S7izs0ZjHVOihC2hHBd1Y6YLsUNSzMSriPv84ikp5cjUMVNPZ4iJ/Up2Z3KJ3aAW6N nyv1A+3pVxqGjATmlZtPjHJTMp7QyzvXW8LP4FgwAwQdj7Y7dpsiKPA2g5eg0N1Lzin6 P28UzLRBmsRXO42XXRA3YX8Z4/NDrmom9CRbUrvGiULiLRGRKdYqC++L+PG82ueNBdVc LvzjfE436tpNDZFufhVVH1BaYYNb3K72zCfmeVzdTLB69aWNfbIXQSNWb7+LIL3QTQgL 1crXZhC2rzqy5Zyolv3TMSZMwdGO3X8vHLE9BkknVrJmNQurswfq0GragY8kgu6oIwr6 13jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ELRRWbl++s+i+fBqCpMabNbs3DbpzvW1uIgibqd7VEI=; b=PHZe856qt0mPgLnbxi7kY9TSU/RPNpIAXJQBP3WmK75Ivdm8VRcNZhobvH/0BqCqMK 8yQk1S5UNbQihhF5Iq8p/WZW9C3kmTKiFAmsb4fVZBwlCmacPf/O/6D5RtM4sg69H+US 54Tg6c0gN2ebQ7DvLgcuGs0u9qVDACM7GeWKiTCMLcH8hrRGYy/PzE+xm457RaN3/Tzk oZCIUFBRUY/X/udax9k6EH96KGKYiFRiGoSawD5mOH2XrDeG8NuNSS5Yez8BRMwWv/ln T9eTOLZzle9ZsAzx7VnBqObup2VlpBM2Kd8BWnesyvwz2QcPLT784Y43vlPohSPmIWpL CA5w== X-Gm-Message-State: ANoB5pnwGBaDRWvtPhUShO8cjm9yJWOCnF+i/opA6Ig3yicLuWNZZlyf ykQZ/lMSKkNY7y/UthRA3XCqF0UeJbzV9Q== X-Google-Smtp-Source: AA0mqf7T1tbZFSaFPnHHGTq15WwAcZFwvgPo0LwbOcMwjKuAx0OuluY44rW2kGrvotqPKYj+O08FEw== X-Received: by 2002:a92:d9cb:0:b0:302:cade:9dca with SMTP id n11-20020a92d9cb000000b00302cade9dcamr16459101ilq.271.1669645109957; Mon, 28 Nov 2022 06:18:29 -0800 (PST) Received: from murgatroyd (97-122-76-186.hlrn.qwest.net. [97.122.76.186]) by smtp.gmail.com with ESMTPSA id o15-20020a92d38f000000b00300f4e0d41bsm3881648ilo.57.2022.11.28.06.18.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 06:18:29 -0800 (PST) From: Tom Tromey To: Tom Tromey via Gdb-patches Cc: Tom Tromey Subject: Re: [PATCH] Fix range type signed-ness heuristic References: <20221115184957.105406-1-tromey@adacore.com> X-Attribution: Tom Date: Mon, 28 Nov 2022 07:18:28 -0700 In-Reply-To: <20221115184957.105406-1-tromey@adacore.com> (Tom Tromey via Gdb-patches's message of "Tue, 15 Nov 2022 11:49:57 -0700") Message-ID: <87wn7fp3gr.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> "Tom" == Tom Tromey via Gdb-patches writes: Tom> The code to create a range type has a heuristic to decide whether the Tom> range is unsigned. However, this heuristic can fail if the upper Tom> bound of the range has its high bit set, because the test is done Tom> using LONGEST. Tom> With this patch, if the underlying type of a range is unsigned, then Tom> the range will always be unsigned. A new test is included. Tom> Regression tested on x86-64 Fedora 34. We've also been using this Tom> internally at AdaCore for a while. I'm checking this in now. Tom