From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 523D7386F436; Wed, 9 Dec 2020 05:36:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 523D7386F436 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98019] Concepts: compound requirement expression from 'requires' expression is considered discarded-value expression for [[nodiscard]], false positive warning emitted Date: Wed, 09 Dec 2020 05:36:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 05:36:39 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98019 --- Comment #5 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:c3a63fb3854392af65a191154e3586e7f5a1066e commit r11-5873-gc3a63fb3854392af65a191154e3586e7f5a1066e Author: Jason Merrill Date: Tue Dec 8 21:47:11 2020 -0500 c++: Avoid [[nodiscard]] warning in requires-expr [PR98019] If we aren't really evaluating the expression, it doesn't matter that t= he return value is discarded. gcc/cp/ChangeLog: PR c++/98019 * cvt.c (maybe_warn_nodiscard): Check c_inhibit_evaluation_warnings. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-nodiscard1.C: Remove xfail.=