From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E0036393BC1C; Wed, 24 Feb 2021 11:57:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E0036393BC1C From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96251] [constexpr, coroutines] co_yield incorrectly rejected in non-explicitly-constexpr generic lambda Date: Wed, 24 Feb 2021 11:57:35 +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.1.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: iains at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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, 24 Feb 2021 11:57:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96251 --- Comment #8 from CVS Commits --- The master branch has been updated by Iain D Sandoe : https://gcc.gnu.org/g:f13d9e48eeca7ed8f8df55c9a62fc9980d5606ad commit r11-7357-gf13d9e48eeca7ed8f8df55c9a62fc9980d5606ad Author: Iain Sandoe Date: Tue Feb 23 12:54:26 2021 +0000 coroutines : Adjust error handling for type-dependent coroutines [PR962= 51]. Although coroutines are not permitted to be constexpr, generic lambdas are implicitly from C++17 and, because of this, a generic coroutine lam= bda can be marked as potentially constexpr. As per the PR, this then fails = when type substitution is attempted because the check disallowing constexpr = in the coroutines code was overly restrictive. This changes the error handing to mark the function as 'invalid_conste= xpr' but suppresses the error in the case that we are instantiating a conste= xpr. gcc/cp/ChangeLog: PR c++/96251 * coroutines.cc (coro_common_keyword_context_valid_p): Suppress error reporting when instantiating for a constexpr. gcc/testsuite/ChangeLog: PR c++/96251 * g++.dg/coroutines/pr96251.C: New test.=