{"id":2222744,"url":"http://patchwork.ozlabs.org/api/patches/2222744/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/patch/20260413150105.930501-1-jason@redhat.com/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/projects/17/?format=json","name":"GNU Compiler Collection","link_name":"gcc","list_id":"gcc-patches.gcc.gnu.org","list_email":"gcc-patches@gcc.gnu.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260413150105.930501-1-jason@redhat.com>","list_archive_url":null,"date":"2026-04-13T15:00:45","name":"[pushed] c++: lambda capture pack and noexcept [PR122632]","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"22a429cc54aab94fc8065dfbda600052d9524785","submitter":{"id":4337,"url":"http://patchwork.ozlabs.org/api/people/4337/?format=json","name":"Jason Merrill","email":"jason@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/gcc/patch/20260413150105.930501-1-jason@redhat.com/mbox/","series":[{"id":499719,"url":"http://patchwork.ozlabs.org/api/series/499719/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=499719","date":"2026-04-13T15:00:45","name":"[pushed] c++: lambda capture pack and noexcept [PR122632]","version":1,"mbox":"http://patchwork.ozlabs.org/series/499719/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2222744/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2222744/checks/","tags":{},"related":[],"headers":{"Return-Path":"<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":["incoming@patchwork.ozlabs.org","gcc-patches@gcc.gnu.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","gcc-patches@gcc.gnu.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=VoZi/594;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)","sourceware.org;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=VoZi/594","sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com","sourceware.org; spf=pass smtp.mailfrom=redhat.com","server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.129.124"],"Received":["from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fvVxQ0lmcz1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 01:01:40 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 9E35D4BA2E15\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 15:01:38 +0000 (GMT)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by sourceware.org (Postfix) with ESMTP id A46974BA5436\n for <gcc-patches@gcc.gnu.org>; Mon, 13 Apr 2026 15:01:12 +0000 (GMT)","from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-199-5rkNiTiwOSW9Mo9kXROEdQ-1; Mon,\n 13 Apr 2026 11:01:08 -0400","from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 4F5F419560B8\n for <gcc-patches@gcc.gnu.org>; Mon, 13 Apr 2026 15:01:07 +0000 (UTC)","from jason-thinkpadp1gen4i.rmtusma.csb (unknown [10.22.80.15])\n by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id D2C41180035F\n for <gcc-patches@gcc.gnu.org>; Mon, 13 Apr 2026 15:01:06 +0000 (UTC)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 9E35D4BA2E15","OpenDKIM Filter v2.11.0 sourceware.org A46974BA5436"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org A46974BA5436","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org A46974BA5436","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776092472; cv=none;\n b=gPUAKBG6hwJtV8Lim4LB+H/gsDcwzkDp/iUJyBqYo+Id0mY64hmwmP90eEWh7p6TdaPu3Wu9nCZR/Swc01STlUbEMyH/bp13E1y9gVvhdEQDs5MkeOcaS92+ZrI/pn6opIz2Y++wjDnr7r2HtjmMBZh0Pfo/RBLvhO1yydJt3nA=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776092472; c=relaxed/simple;\n bh=P4XE1nmTKXeC8ZFbXS6F6LlyBWQjW1KhG6PFZ4oDnoE=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=ojjCEogte1juu49K+h15a6fiaNGcHs0cj/FxZGhNZFIDadjzqvMMbGnR5J9YKpe8vwiUETi7jM4cM30cSwjJ9VaFgWas7xR4clbA5ytsQNbWnb+YvyPN10H+0d64E6lSIvWZihbegenWthHDbFTIocT2XMnaTIkJYm72umSfhqo=","ARC-Authentication-Results":"i=1; server2.sourceware.org","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1776092472;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=zx9np2pu6m4eF41g3mH/uGeO685Vt4CPlGAe/PL4Wig=;\n b=VoZi/594E2NEkDwxcddOTiJz0XDJ3UcTRc6RVZUHavZWPERRbBlMcbWqv3kBAhe9VGMRHX\n A1FmWmKQIu6kejtZaPtUnhJk7xTcEEF/pn5STJ0f1OyqT1cG4eZ8fQUpX4ANxhEipZGLFD\n 5fJXcDhpVP3ZxXh3SVlf9A5jg1LiQVQ=","X-MC-Unique":"5rkNiTiwOSW9Mo9kXROEdQ-1","X-Mimecast-MFC-AGG-ID":"5rkNiTiwOSW9Mo9kXROEdQ_1776092467","From":"Jason Merrill <jason@redhat.com>","To":"gcc-patches@gcc.gnu.org","Subject":"[pushed] c++: lambda capture pack and noexcept [PR122632]","Date":"Mon, 13 Apr 2026 11:00:45 -0400","Message-ID":"<20260413150105.930501-1-jason@redhat.com>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.4.1 on 10.30.177.111","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"GVZAfmZC7RJG7CNsnFUg3VH4Sh9ss31hgxIvCqe03Ik_1776092467","X-Mimecast-Originator":"redhat.com","Content-Transfer-Encoding":"8bit","content-type":"text/plain; charset=\"US-ASCII\"; x-default=true","X-BeenThere":"gcc-patches@gcc.gnu.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Gcc-patches mailing list <gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>","List-Archive":"<https://gcc.gnu.org/pipermail/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-request@gcc.gnu.org?subject=help>","List-Subscribe":"<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"},"content":"Tested x86_64-pc-linux-gnu, applying to trunk.\n\n-- 8< --\n\nThis should have been fixed by the patch for 122884, except that we were\nforgetting to treat the noexcept substitution as an unevaluated context.\n\n\tPR c++/122632\n\ngcc/cp/ChangeLog:\n\n\t* pt.cc (tsubst_exception_specification): Add cp_unevaluated.\n\ngcc/testsuite/ChangeLog:\n\n\t* g++.dg/cpp23/lambda-scope11.C: New test.\n---\n gcc/cp/pt.cc                                |  1 +\n gcc/testsuite/g++.dg/cpp23/lambda-scope11.C | 10 ++++++++++\n 2 files changed, 11 insertions(+)\n create mode 100644 gcc/testsuite/g++.dg/cpp23/lambda-scope11.C\n\n\nbase-commit: 73ade2eefb56338d99a6e642d28fd7efae8b6289","diff":"diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc\nindex f778c7c270d..96faac7a2b0 100644\n--- a/gcc/cp/pt.cc\n+++ b/gcc/cp/pt.cc\n@@ -16720,6 +16720,7 @@ tsubst_exception_specification (tree fntype,\n \t\t\t\t\t   args);\n \t      expr = DEFERRED_NOEXCEPT_PATTERN (expr);\n \t    }\n+\t  cp_unevaluated u;\n \t  new_specs = tsubst_expr (expr, args, complain, in_decl);\n \t}\n       new_specs = build_noexcept_spec (new_specs, complain);\ndiff --git a/gcc/testsuite/g++.dg/cpp23/lambda-scope11.C b/gcc/testsuite/g++.dg/cpp23/lambda-scope11.C\nnew file mode 100644\nindex 00000000000..916c746e3b3\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/cpp23/lambda-scope11.C\n@@ -0,0 +1,10 @@\n+// PR c++/122632\n+// { dg-do compile { target c++20 } }\n+\n+void f(auto... x) {\n+  [...y = x]() noexcept((... && noexcept(y))) {};\n+}\n+\n+int main() {\n+\tf();\n+}\n","prefixes":["pushed"]}