From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id jrYXJXxu/mrRrh4AWB0awg (envelope-from ) for ; Wed, 18 Nov 2026 22:35:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1795059324; bh=dNOvyo9VHjD105gJdbU6foK+cdEB9b42Y9poq1KMm1Q=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vC21GfiZZzUWT2FljinxuWur6oFXWe4e396pWCVMXrNseTyRMzJLHUMknzCWl0jLX I//4bxo7WLUKCShu8oIfw0q2nvsAviW/h1mjhp0SGj9BAMYQzlmuOzjFzFt4lUPIYn DwiLRIAStDSAFQCsIQU/Y8tXaZvD8PH5pYLXyQmA= Received: by simark.ca (Postfix, from userid 112) id 3F9A81E0BC; Wed, 18 Nov 2026 22:35:24 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=VCP7Gv8y; dkim-atps=neutral Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 5EC3B1E087 for ; Wed, 18 Nov 2026 22:35:22 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E9DB04BA2E2C for ; Thu, 19 Nov 2026 03:35:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E9DB04BA2E2C Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=VCP7Gv8y Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 9BEAA4BA5434 for ; Thu, 19 Nov 2026 03:34:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9BEAA4BA5434 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9BEAA4BA5434 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1795059298; cv=none; b=pWvkHr/eny03aLGVF5wHiPdz15flFqr8pdV67d/fWkJT/duBawyqbyq1d+YR3TkXPaw/qX1to78p9t4nlFy/yFvNWzAOywshDUHoBmwudIiy28eAyt5wh1y6FWX6txxCNPrcuU9lxGupqBDbwsIWDR2W5E+nGZuogVamKc0e2sU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1795059298; c=relaxed/simple; bh=dNOvyo9VHjD105gJdbU6foK+cdEB9b42Y9poq1KMm1Q=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=NSFbN8jlsujt8HuOnFNA/wzB/n47IbAP6/xT6uxzzKmDUDdekZHAKADiqoz7MPRrC3BVfDvfocsOGxSZfNX8+hsaGJq31RBGwEGJKHMzla/X3EwCfBdbhM+NJBqw0y3q0UHOv42Itl4CReWG/hMrawMWbkqgOztL3i0yxoR0wKE= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=VCP7Gv8y DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9BEAA4BA5434 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1795059294; bh=dNOvyo9VHjD105gJdbU6foK+cdEB9b42Y9poq1KMm1Q=; h=Date:Subject:To:References:From:In-Reply-To:From; b=VCP7Gv8y3F0OfaDU7ZiGGk3O3vvcqZFJmGX3tw9WN1dbP5naSmCz/JoUlpZMpCK/q pLALhrgumMk0qvRp1nPTVW3oawH2JhHxmtSulokscN4HTTMyTZiQofISpVxOWa5v6p /uMVG6rFWaeCBOOFJe7myGdMbfA4q5v+ULguMtPc= Received: by simark.ca (Postfix) id D1A971E087; Wed, 18 Nov 2026 22:34:53 -0500 (EST) Message-ID: Date: Wed, 18 Nov 2026 22:34:53 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 11/16] Don't use the single-argument gdb::span constructor To: Tom Tromey , gdb-patches@sourceware.org References: <20261118-span-part-1-v4-0-5ecf901e570b@adacore.com> <20261118-span-part-1-v4-11-5ecf901e570b@adacore.com> Content-Language: fr From: Simon Marchi In-Reply-To: <20261118-span-part-1-v4-11-5ecf901e570b@adacore.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org > diff --git a/gdb/unittests/span-selftests.c b/gdb/unittests/span-selftests.c > index eb192bd49fd..3e3a7f59ace 100644 > --- a/gdb/unittests/span-selftests.c > +++ b/gdb/unittests/span-selftests.c > @@ -431,9 +431,9 @@ run_tests () > SELF_CHECK (check_container_view (view, array)); > > gdb_byte elem = 0; > - view = elem; > + view = gdb::make_span (&elem, 1); > SELF_CHECK (check_elem_view (view, elem)); > - view = std::move (elem); > + view = std::move (gdb::make_span (&elem, 1)); > SELF_CHECK (check_elem_view (view, elem)); Ultimately, these ones are testing assigning a span from a span, which is extensively tested a few lines below, where it says: /* Same, but op=(view). */ I think you can remove these two tests, since the point is that you're removing that capability. They could be removed in patch "Make gdb::span conform more closely to C++20" since that's the one introducing the behavior change. > } > > @@ -519,7 +519,7 @@ run_tests () > SELF_CHECK (view_array.size () == 3); > > Vec elem; > - gdb::span view_elem = elem; > + gdb::span view_elem = gdb::make_span (&elem, 1); > SELF_CHECK (view_elem.size () == 1); Likewise here. Otherwise LGTM. Approved-By: Simon Marchi Simon