From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8pliJv48RWUh7z0AWB0awg (envelope-from ) for ; Fri, 03 Nov 2023 14:33:34 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=lIUzpPH+; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 8DF571E1A7; Fri, 3 Nov 2023 14:33:34 -0400 (EDT) Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 7E72D1E0D2 for ; Fri, 3 Nov 2023 14:33:32 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2F9AE3858409 for ; Fri, 3 Nov 2023 18:33:32 +0000 (GMT) Received: from omta034.useast.a.cloudfilter.net (omta034.useast.a.cloudfilter.net [44.202.169.33]) by sourceware.org (Postfix) with ESMTPS id CF47F3858D32 for ; Fri, 3 Nov 2023 18:33:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CF47F3858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CF47F3858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699036401; cv=none; b=UgyDg3Ok6UQR0EUinfOQZBk9PyvNsOCUqJU0NdoLQdzS/oivTPj4YDQWnVts22wImgaE0P8WsKl1224gVWSBbDdwbP41thlsM5hbLb38ZpECGJVy/fmLQ6CsCQMqsJ6WQquTED8yO7FaosL66G2WEKOBBlVXoB9KsZqZkxJgIkI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699036401; c=relaxed/simple; bh=HW/MJM9KRCo9aI36Vw7uwKUPEs5iH96jO43XwCBph7w=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Om6BC9OhKb6QAKGrZMwSh4Xz3zdNiWcZbkSceUCigxNyXV2I+FBw9exrB9GE1cycipm/mp4uJH0JCg/TFtn+2t24cmYBPRkYmkY83A7IT9W/JxNfjv/50rk05kHKk2I2Ziu5kOjyFzOG9D4adlR39NZ6hCHfmr8j3o19zl/KebM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6005a.ext.cloudfilter.net ([10.0.30.201]) by cmsmtp with ESMTPS id ywkGq2p8zjtZ3yyymqDggW; Fri, 03 Nov 2023 18:33:12 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id yyyjqxL05wuSEyyyjq8yjU; Fri, 03 Nov 2023 18:33:09 +0000 X-Authority-Analysis: v=2.4 cv=evvMc6lX c=1 sm=1 tr=0 ts=65453ce5 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=BNY50KLci1gA:10 a=Qbun_eYptAEA:10 a=_bL7LBJCtqmqlC0XU7oA:9 a=zgiPjhLxNE0A:10 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=HTznPlrwetLZdfZ/sF1hhtz/DdpekM0TiU4D7v6ogjM=; b=lIUzpPH+VITWoNAVG9T5IBrvf9 dTSX4HXclXondJEiEESS0gVCxWlHNgJeh76W60hponXItVGRWFisI59OAfbJtuEeWvEN5F4/I+pEG Jqd7PE5/tS3CFzPAcEJZvOB+9; Received: from 97-122-77-73.hlrn.qwest.net ([97.122.77.73]:39614 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1qyyyi-000PSV-38; Fri, 03 Nov 2023 12:33:09 -0600 From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCH] gdbsupport: mark array_view::slice with [[nodiscard]] References: <20231103031917.927026-1-simon.marchi@polymtl.ca> <87y1feiu3n.fsf@tromey.com> X-Attribution: Tom Date: Fri, 03 Nov 2023 12:33:07 -0600 In-Reply-To: (Simon Marchi's message of "Fri, 3 Nov 2023 14:28:25 -0400") Message-ID: <87lebeit5o.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.77.73 X-Source-L: No X-Exim-ID: 1qyyyi-000PSV-38 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-77-73.hlrn.qwest.net (murgatroyd) [97.122.77.73]:39614 X-Source-Auth: tom+tromey.com X-Email-Count: 12 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfNhbP5GOARkoPFohKZwDek6yiajFC150rI3wEj/KZ6dkbm1V533WNRu2CwYsBSiCIVQGVphRbXkHaXF9dhQbG2kiZtsp4+qms4w1aIByCdKSooqxVxOw 4qgLPptKReNUiM/Q6//grpnf+VihVQoDByPvRYcnBMuYAIaXup9h6V0kvfiN3VaPzNJy5jHIgBkbZAX/AOXZLx6zVOieRmqkBI8= X-Spam-Status: No, score=-3018.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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 >> Unfortunately std::span::subspan doesn't seem to have this annotation. >> I wonder if it could be added. Simon> Is it something that would be mandated by the standard, or just the Simon> choice of each implementation? I asked Jonathan Wakely on irc and he said he'll add it to libstdc++. The standard does sometimes specify [[nodiscard]], but he said that he has been campaigning against that, because implementations are already free to add it anywhere (they can emit any warnings they like) and they are also free to ignore any annotation. So specifying it is pointless. Tom