From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by sourceware.org (Postfix) with ESMTPS id AD9F33851C2C; Thu, 5 Aug 2021 14:27:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AD9F33851C2C Received: by mail-qt1-x830.google.com with SMTP id c5so3952813qtp.13; Thu, 05 Aug 2021 07:27:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o2ddRKYklZsEvpFmGOePEiAD4rfQa3uvpDHh7qUfBjU=; b=RL1k4om648ZanlsA39Budlfz/gmqzVzJSdx9rsaqfTtuxuACRDPjZPalxuH9X1/CZQ FyKKyQ2qm/5ENU+3u5woqHxLM+fdD5Bo/bzU2sTtOXDkAY4pqsubvbMxJ0CAbWZ5cjuH /A1Zm4WqTkDSZOJzK9jQ02+ZyP0fk4Tlk1DmsmwQEODuOwqZ8yJUqoyWhx3h17tJYYCL ZQrpX7QFAgIbMPPEUyccHryyPtHytasR/4H63AjIlTDwqfTiO8NtwmG9uJ99DkLD5suU UfNk/8pjnNhBsTsZnqc0mX5UXynNRjqN6KNNpY+4VuQh9oxfXIZGKjG9yuKLA7vB+sUL eC8w== X-Gm-Message-State: AOAM531bvAB0Mc3t672PjU8waBYirrbKPhU9EY6nsb4q1TEdAkREAmYN PMVohdb+f2tEn219Wni7S/8Zh6FCuzChLHHTNJw= X-Google-Smtp-Source: ABdhPJwX8WWcgv9j9QtLLBiW3emIwYqyESYK+dCNE3b2t0++hV+bC1+fS1Ny64x34jHAwxhq4Hxwtmn3mGq1ci57f5c= X-Received: by 2002:a05:622a:11d6:: with SMTP id n22mr3695565qtk.163.1628173660354; Thu, 05 Aug 2021 07:27:40 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ville Voutilainen Date: Thu, 5 Aug 2021 17:27:29 +0300 Message-ID: Subject: Re: [committed] libstdc++: Move attributes that follow requires-clauses [PR101782] To: Jonathan Wakely Cc: "libstdc++" , gcc-patches List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2021 14:27:42 -0000 On Thu, 5 Aug 2021 at 17:21, Jonathan Wakely via Libstdc++ wrote: > > On 04/08/21 12:55 +0100, Jonathan Wakely wrote: > >This adds [[nodiscard]] throughout , as proposed by P2377R0 > >(with some minor corrections). > > > >The attribute is added for all modes from C++11 up, using > >[[__nodiscard__]] or _GLIBCXX_NODISCARD where C++17 [[nodiscard]] can't > >be used directly. > > This change causes errors when -fconcepts-ts is used. Fixed like so. But this makes the attribute appertain to the function type, not to the function. It's also ill-formed: "The attribute-token nodiscard may be applied to the declarator-id in a function declaration or to the declaration of a class or enumeration. " Your change makes nodiscard be applied to the function declaration, not to the declarator-id.