From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 986B43858C98; Tue, 5 Mar 2024 19:51:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 986B43858C98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709668295; bh=ml6qX9PcgIpwJOSnUNLvN7gYY/wUVCNNP5jO936KMjk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RkexgLnYrtpHiJcuHw0nN/TDVmTtoizsB4wGwTBWh/o4pOozXg4PN/ZLRrnnmiI7k NazqClmyE7pudSu1BO6FXT19o+3B0YAKWv4pgFcbNpajthnqWWhSSwTiA5QLjenYkz zPok1rUxWbkLQ5b94zvv2igwIrIUCU10HWY2ziks= From: "src at andyf dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114242] Coroutine with lambda-coroutine and operator new does not compile Date: Tue, 05 Mar 2024 19:51: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: unknown X-Bugzilla-Keywords: C++-coroutines, rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: src at andyf dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114242 --- Comment #5 from Andreas Fertig --- My latest conclusion is that my code is indeed invalid. In the case of the lambda, I have a class type. http://eel.is/c++draft/dcl.fct.def.coroutine#4 says that in such a case, p1 is an lvalue of *this. If I modify my original example, g++ and MSVC accept the code, but Clang now rejects it: https://compiler-explorer.com/z/1hhxfYW1v I will open an issue there and let them confirm. But I think we can close t= his issue for g++.=