{"id":2226300,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2226300/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/patch/aeimmIzkde2vEIsT@tucnak/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/1.2/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":"<aeimmIzkde2vEIsT@tucnak>","list_archive_url":null,"date":"2026-04-22T10:44:40","name":"c++, libstc++, v2: Bump __cpp_impl_reflection and __cpp_lib_reflection","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"62fc5f439e4d1e6de704bf509670fbaf274081cf","submitter":{"id":671,"url":"http://patchwork.ozlabs.org/api/1.2/people/671/?format=json","name":"Jakub Jelinek","email":"jakub@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/gcc/patch/aeimmIzkde2vEIsT@tucnak/mbox/","series":[{"id":500991,"url":"http://patchwork.ozlabs.org/api/1.2/series/500991/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=500991","date":"2026-04-22T10:44:40","name":"c++, libstc++, v2: Bump __cpp_impl_reflection and __cpp_lib_reflection","version":1,"mbox":"http://patchwork.ozlabs.org/series/500991/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2226300/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2226300/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=OJEeAR8L;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::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=OJEeAR8L","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.133.124"],"Received":["from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::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 4g0xcC0r9fz1yHB\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 21:20:59 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 10B9742898FC\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 11:20:57 +0000 (GMT)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by sourceware.org (Postfix) with ESMTP id 5F47E4081AA0\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 10:44:54 +0000 (GMT)","from mx-prod-mc-03.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-586-3IZhN4gAOP28cGWJqWEyvQ-1; Wed,\n 22 Apr 2026 06:44:45 -0400","from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17])\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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 0988E195606F; Wed, 22 Apr 2026 10:44:44 +0000 (UTC)","from tucnak.zalov.cz (unknown [10.44.48.12])\n by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with\n ESMTPS\n id 646E31956095; Wed, 22 Apr 2026 10:44:43 +0000 (UTC)","from tucnak.zalov.cz (localhost [127.0.0.1])\n by tucnak.zalov.cz (8.18.1/8.18.1) with ESMTPS id 63MAiewm4029136\n (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);\n Wed, 22 Apr 2026 12:44:40 +0200","(from jakub@localhost)\n by tucnak.zalov.cz (8.18.1/8.18.1/Submit) id 63MAie2q4029135;\n Wed, 22 Apr 2026 12:44:40 +0200"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 10B9742898FC","OpenDKIM Filter v2.11.0 sourceware.org 5F47E4081AA0"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 5F47E4081AA0","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 5F47E4081AA0","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776854694; cv=none;\n b=LVz2Wdh/43rBojYJtdiKKtCz0CA71g31cDvVcQXfmbX4p2TOkW+EKqW6mR4p7a35aFq4ZtqpoOOH3XJn4stz4sAXrlJCxpGXsNztq4geOUK3fzUgpaVstGsy0AZtZ9QfHL63U36u0GrR/4tv0ln13dV40dpLhFOOBjHmfpJXzXY=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776854694; c=relaxed/simple;\n bh=+j0royoUTKZcIbbeN03HUiCwbwBmBQLF8cQcBQepKqI=;\n h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;\n b=bgJJXfk+pNKkYlrXKJDh8vsG9TYZw7gO0+AiTqBc+d5MB04jH1IkYfHEPyutei1tUgGKYT7JrxNy+H/ufk4F9kkPH9GEvKc/TuQJqkMt6QhIj8c/okqIGE+2iOY//4d/jSvti7UiJdGYnIFAgr7AkaMNSYHaj2eFtVnvMzXLE1Q=","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=1776854693;\n h=from:from:reply-to:reply-to:subject:subject:date:date:\n message-id:message-id:to:to:cc:cc:mime-version:mime-version:\n content-type:content-type:in-reply-to:in-reply-to:  references:references;\n bh=pQ1ZeoC4BrDl4LELDj5cc310U8jnJXcYDlPw1gi13Rw=;\n b=OJEeAR8LUN1fbiuRL+WGa/k6y7DmPO+Th3nXgGVapLRWp+drxyHcUIy6U8GKf5h9B0bIBb\n gs0mzBmlezrNcvd+08NcaMfcxfr2YyU9DHRtp67GYS9TNnJ4HxJo7Xotlkj+UyhW1vAwhn\n tBSFDmKYhm08OBqTq6CudW5a8Jq/4Wo=","X-MC-Unique":"3IZhN4gAOP28cGWJqWEyvQ-1","X-Mimecast-MFC-AGG-ID":"3IZhN4gAOP28cGWJqWEyvQ_1776854684","Date":"Wed, 22 Apr 2026 12:44:40 +0200","From":"Jakub Jelinek <jakub@redhat.com>","To":"Jason Merrill <jason@redhat.com>, Jonathan Wakely <jwakely@redhat.com>","Cc":"gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org","Subject":"[PATCH] c++, libstc++, v2: Bump __cpp_impl_reflection and\n __cpp_lib_reflection","Message-ID":"<aeimmIzkde2vEIsT@tucnak>","References":"<aeihoaiuRwi1vH70@tucnak>\n <CACb0b4nzDuOuFnb+-WE0jWH8PQk8V3d5EbPiX3OdJ4MF9gB8mg@mail.gmail.com>\n <CACb0b4n_tMLnD3ca76vPuqoNTWFKYo=i6whsVw-9aW+Zsjwt4w@mail.gmail.com>","MIME-Version":"1.0","In-Reply-To":"\n <CACb0b4n_tMLnD3ca76vPuqoNTWFKYo=i6whsVw-9aW+Zsjwt4w@mail.gmail.com>","X-Scanned-By":"MIMEDefang 3.0 on 10.30.177.17","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"quevSWwBaAaQbCgglbo3OOHQC1LMNQuX-bSRP7Dfm6E_1776854684","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","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>","Reply-To":"Jakub Jelinek <jakub@redhat.com>","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"},"content":"On Wed, Apr 22, 2026 at 11:36:01AM +0100, Jonathan Wakely wrote:\n> > > --- libstdc++-v3/include/std/meta.jj    2026-04-21 18:24:44.122033404 +0200\n> > > +++ libstdc++-v3/include/std/meta       2026-04-22 12:04:19.089452664 +0200\n> > > @@ -37,7 +37,7 @@\n> > >  #define __glibcxx_want_define_static\n> > >  #include <bits/version.h>\n> > >\n> > > -#if __glibcxx_reflection >= 202506L // C++ >= 26 && __cpp_impl_reflection\n> > > +#if __glibcxx_reflection >= 202603L // C++ >= 26 && __cpp_impl_reflection\n> >\n> > I don't think we need to change any of the #if checks below here,\n> > because nothing in those #if groups was changed by P3795. The checks\n> > in e.g. <type_traits> and the tests are saying \"is the value of the\n> > macro high enough that we should provide these features?\" and that's\n> > true for the old value.\n> \n> The #if in <meta> guards the addition of the annotations vector to\n> data_member_spec, so checking the new value there makes sense.\n\nYeah, for <meta> sure, and I think for std.cc.in too (otherwise\ne.g. std::meta::current_namespace wouldn't be available).\nFor <type_traits> and the two libstdc++ tests, I agree we can keep comparing\nagainst the old value.  Actually, for the second case in std.cc.in (whether\nis_reflection_v is available) we can keep using the existing value too.\n\nSo here is an updated patch:\n\n2026-04-22  Jakub Jelinek  <jakub@redhat.com>\n\ngcc/c-family/\n\t* c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_impl_reflection value\n\tfrom 202506L to 202603L.\ngcc/testsuite/\n\t* g++.dg/DRs/dr2581-2.C: Adjust for __cpp_impl_reflection bump from\n\t202506L to 202603L.\n\t* g++.dg/reflect/feat1.C: Likewise.  Also adjust for\n\t__cpp_lib_reflection bump from 202506L to 202603L.\n\t* g++.dg/reflect/feat2.C: Likewise.\n\t* g++.dg/reflect/feat3.C: Likewise.\nlibstdc++-v3/\n\t* include/bits/version.def (reflection): Bump 202506L to 202603L\n\tfor both v and in extra_cond.\n\t* include/bits/version.h: Regenerate.\n\t* include/std/meta: Compare __glibcxx_reflection against\n\t202603L rather than 202506L.\n\t* src/c++23/std.cc.in: Likewise.\n\n\n\n\tJakub","diff":"--- gcc/c-family/c-cppbuiltin.cc.jj\t2026-03-27 10:17:13.713337609 +0100\n+++ gcc/c-family/c-cppbuiltin.cc\t2026-04-22 11:59:44.926135527 +0200\n@@ -1119,7 +1119,7 @@ c_cpp_builtins (cpp_reader *pfile)\n \t  cpp_define (pfile, \"__cpp_constexpr_virtual_inheritance=202506L\");\n \t  cpp_define (pfile, \"__cpp_expansion_statements=202506L\");\n \t  if (flag_reflection)\n-\t    cpp_define (pfile, \"__cpp_impl_reflection=202506L\");\n+\t    cpp_define (pfile, \"__cpp_impl_reflection=202603L\");\n \t  else\n \t    cpp_warn (pfile, \"__cpp_impl_reflection\");\n \t}\n--- gcc/testsuite/g++.dg/DRs/dr2581-2.C.jj\t2026-03-27 10:17:15.320311386 +0100\n+++ gcc/testsuite/g++.dg/DRs/dr2581-2.C\t2026-04-22 12:02:27.265362686 +0200\n@@ -64,7 +64,7 @@\n #define __cpp_impl_coroutine 201902L\t\t// { dg-error \"'__cpp_impl_coroutine' redefined\" \"\" { target c++20 } }\n #define __cpp_impl_destroying_delete 201806L\t// { dg-error \"'__cpp_impl_destroying_delete' redefined\" \"\" { target c++20 } }\n #define __cpp_impl_three_way_comparison 201907L\t// { dg-error \"'__cpp_impl_three_way_comparison' redefined\" \"\" { target c++20 } }\n-#define __cpp_impl_reflection 202506L\t\t// { dg-error \"'__cpp_impl_reflection' redefined\" \"\" { target c++26 } }\n+#define __cpp_impl_reflection 202603L\t\t// { dg-error \"'__cpp_impl_reflection' redefined\" \"\" { target c++26 } }\n #define __cpp_implicit_move 202207L\t\t// { dg-error \"'__cpp_implicit_move' redefined\" \"\" { target c++23 } }\n #define __cpp_inheriting_constructors 201511L\t// { dg-error \"'__cpp_inheriting_constructors' redefined\" \"\" { target c++20 } }\n #define __cpp_init_captures 201803L\t\t// { dg-error \"'__cpp_init_captures' redefined\" \"\" { target c++14 } }\n--- gcc/testsuite/g++.dg/reflect/feat1.C.jj\t2026-03-27 10:17:16.125298250 +0100\n+++ gcc/testsuite/g++.dg/reflect/feat1.C\t2026-04-22 12:00:26.919418259 +0200\n@@ -4,14 +4,14 @@\n \n #ifndef __cpp_impl_reflection\n #  error \"__cpp_impl_reflection\"\n-#elif __cpp_impl_reflection != 202506\n-#  error \"__cpp_impl_reflection != 202506\"\n+#elif __cpp_impl_reflection != 202603\n+#  error \"__cpp_impl_reflection != 202603\"\n #endif\n \n #include <meta>\n \n #ifndef __cpp_lib_reflection\n #  error \"__cpp_lib_reflection\"\n-#elif __cpp_lib_reflection != 202506\n-#  error \"__cpp_lib_reflection != 202506\"\n+#elif __cpp_lib_reflection != 202603\n+#  error \"__cpp_lib_reflection != 202603\"\n #endif\n--- gcc/testsuite/g++.dg/reflect/feat2.C.jj\t2026-03-27 10:17:16.125298250 +0100\n+++ gcc/testsuite/g++.dg/reflect/feat2.C\t2026-04-22 12:00:42.738148067 +0200\n@@ -6,8 +6,8 @@\n \n #ifndef __cpp_lib_reflection\n #  error \"__cpp_lib_reflection\"\n-#elif __cpp_lib_reflection != 202506\n-#  error \"__cpp_lib_reflection != 202506\"\n+#elif __cpp_lib_reflection != 202603\n+#  error \"__cpp_lib_reflection != 202603\"\n #endif\n \n #ifndef __cpp_lib_define_static\n--- gcc/testsuite/g++.dg/reflect/feat3.C.jj\t2026-03-27 10:17:16.125298250 +0100\n+++ gcc/testsuite/g++.dg/reflect/feat3.C\t2026-04-22 12:01:46.374061130 +0200\n@@ -6,8 +6,8 @@\n \n #ifndef __cpp_lib_reflection\n #  error \"__cpp_lib_reflection\"\n-#elif __cpp_lib_reflection != 202506\n-#  error \"__cpp_lib_reflection != 202506\"\n+#elif __cpp_lib_reflection != 202603\n+#  error \"__cpp_lib_reflection != 202603\"\n #endif\n \n #ifndef __cpp_lib_define_static\n--- libstdc++-v3/include/bits/version.def.jj\t2026-04-14 21:13:35.039460718 +0200\n+++ libstdc++-v3/include/bits/version.def\t2026-04-22 12:03:42.709074062 +0200\n@@ -2337,9 +2337,9 @@ ftms = {\n ftms = {\n   name = reflection;\n   values = {\n-    v = 202506;\n+    v = 202603;\n     cxxmin = 26;\n-    extra_cond = \"__cpp_impl_reflection >= 202506L\";\n+    extra_cond = \"__cpp_impl_reflection >= 202603L\";\n     cxx11abi = yes;\n   };\n };\n--- libstdc++-v3/include/bits/version.h.jj\t2026-04-14 21:13:35.039460718 +0200\n+++ libstdc++-v3/include/bits/version.h\t2026-04-22 12:03:49.126595150 +0200\n@@ -2602,10 +2602,10 @@\n #undef __glibcxx_want_philox_engine\n \n #if !defined(__cpp_lib_reflection)\n-# if (__cplusplus >  202302L) && _GLIBCXX_USE_CXX11_ABI && (__cpp_impl_reflection >= 202506L)\n-#  define __glibcxx_reflection 202506L\n+# if (__cplusplus >  202302L) && _GLIBCXX_USE_CXX11_ABI && (__cpp_impl_reflection >= 202603L)\n+#  define __glibcxx_reflection 202603L\n #  if defined(__glibcxx_want_all) || defined(__glibcxx_want_reflection)\n-#   define __cpp_lib_reflection 202506L\n+#   define __cpp_lib_reflection 202603L\n #  endif\n # endif\n #endif /* !defined(__cpp_lib_reflection) */\n--- libstdc++-v3/include/std/meta.jj\t2026-04-21 18:24:44.122033404 +0200\n+++ libstdc++-v3/include/std/meta\t2026-04-22 12:04:19.089452664 +0200\n@@ -37,7 +37,7 @@\n #define __glibcxx_want_define_static\n #include <bits/version.h>\n \n-#if __glibcxx_reflection >= 202506L // C++ >= 26 && __cpp_impl_reflection\n+#if __glibcxx_reflection >= 202603L // C++ >= 26 && __cpp_impl_reflection\n \n #include <array>\n #include <initializer_list>\n--- libstdc++-v3/src/c++23/std.cc.in.jj\t2026-04-10 08:45:20.742811345 +0200\n+++ libstdc++-v3/src/c++23/std.cc.in\t2026-04-22 12:05:31.902208977 +0200\n@@ -2083,7 +2083,7 @@ export namespace std::pmr\n }\n \n // <meta>\n-#if __glibcxx_reflection >= 202506L\n+#if __glibcxx_reflection >= 202603L\n export namespace std\n {\n #if __has_builtin(__builtin_is_string_literal)\n","prefixes":[]}