[{"id":3680547,"web_url":"http://patchwork.ozlabs.org/comment/3680547/","msgid":"<CACb0b4=b+cXD+aM47uhOYBZjAA5aJ0rbkA94GArHBrqjjmDxkQ@mail.gmail.com>","list_archive_url":null,"date":"2026-04-22T10:46:36","subject":"Re: [PATCH] c++, libstc++,\n v2: Bump __cpp_impl_reflection and __cpp_lib_reflection","submitter":{"id":48004,"url":"http://patchwork.ozlabs.org/api/people/48004/","name":"Jonathan Wakely","email":"jwakely@redhat.com"},"content":"On Wed, 22 Apr 2026 at 11:44, Jakub Jelinek <jakub@redhat.com> wrote:\n>\n> 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>\n> Yeah, for <meta> sure, and I think for std.cc.in too (otherwise\n> e.g. std::meta::current_namespace wouldn't be available).\n> For <type_traits> and the two libstdc++ tests, I agree we can keep comparing\n> against the old value.  Actually, for the second case in std.cc.in (whether\n> is_reflection_v is available) we can keep using the existing value too.\n>\n> So here is an updated patch:\n\nThe library parts are OK, thanks.\n\n>\n> 2026-04-22  Jakub Jelinek  <jakub@redhat.com>\n>\n> gcc/c-family/\n>         * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_impl_reflection value\n>         from 202506L to 202603L.\n> gcc/testsuite/\n>         * g++.dg/DRs/dr2581-2.C: Adjust for __cpp_impl_reflection bump from\n>         202506L to 202603L.\n>         * g++.dg/reflect/feat1.C: Likewise.  Also adjust for\n>         __cpp_lib_reflection bump from 202506L to 202603L.\n>         * g++.dg/reflect/feat2.C: Likewise.\n>         * g++.dg/reflect/feat3.C: Likewise.\n> libstdc++-v3/\n>         * include/bits/version.def (reflection): Bump 202506L to 202603L\n>         for both v and in extra_cond.\n>         * include/bits/version.h: Regenerate.\n>         * include/std/meta: Compare __glibcxx_reflection against\n>         202603L rather than 202506L.\n>         * src/c++23/std.cc.in: Likewise.\n>\n> --- gcc/c-family/c-cppbuiltin.cc.jj     2026-03-27 10:17:13.713337609 +0100\n> +++ gcc/c-family/c-cppbuiltin.cc        2026-04-22 11:59:44.926135527 +0200\n> @@ -1119,7 +1119,7 @@ c_cpp_builtins (cpp_reader *pfile)\n>           cpp_define (pfile, \"__cpp_constexpr_virtual_inheritance=202506L\");\n>           cpp_define (pfile, \"__cpp_expansion_statements=202506L\");\n>           if (flag_reflection)\n> -           cpp_define (pfile, \"__cpp_impl_reflection=202506L\");\n> +           cpp_define (pfile, \"__cpp_impl_reflection=202603L\");\n>           else\n>             cpp_warn (pfile, \"__cpp_impl_reflection\");\n>         }\n> --- gcc/testsuite/g++.dg/DRs/dr2581-2.C.jj      2026-03-27 10:17:15.320311386 +0100\n> +++ gcc/testsuite/g++.dg/DRs/dr2581-2.C 2026-04-22 12:02:27.265362686 +0200\n> @@ -64,7 +64,7 @@\n>  #define __cpp_impl_coroutine 201902L           // { dg-error \"'__cpp_impl_coroutine' redefined\" \"\" { target c++20 } }\n>  #define __cpp_impl_destroying_delete 201806L   // { dg-error \"'__cpp_impl_destroying_delete' redefined\" \"\" { target c++20 } }\n>  #define __cpp_impl_three_way_comparison 201907L        // { dg-error \"'__cpp_impl_three_way_comparison' redefined\" \"\" { target c++20 } }\n> -#define __cpp_impl_reflection 202506L          // { dg-error \"'__cpp_impl_reflection' redefined\" \"\" { target c++26 } }\n> +#define __cpp_impl_reflection 202603L          // { dg-error \"'__cpp_impl_reflection' redefined\" \"\" { target c++26 } }\n>  #define __cpp_implicit_move 202207L            // { dg-error \"'__cpp_implicit_move' redefined\" \"\" { target c++23 } }\n>  #define __cpp_inheriting_constructors 201511L  // { dg-error \"'__cpp_inheriting_constructors' redefined\" \"\" { target c++20 } }\n>  #define __cpp_init_captures 201803L            // { dg-error \"'__cpp_init_captures' redefined\" \"\" { target c++14 } }\n> --- gcc/testsuite/g++.dg/reflect/feat1.C.jj     2026-03-27 10:17:16.125298250 +0100\n> +++ gcc/testsuite/g++.dg/reflect/feat1.C        2026-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     2026-03-27 10:17:16.125298250 +0100\n> +++ gcc/testsuite/g++.dg/reflect/feat2.C        2026-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     2026-03-27 10:17:16.125298250 +0100\n> +++ gcc/testsuite/g++.dg/reflect/feat3.C        2026-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    2026-04-14 21:13:35.039460718 +0200\n> +++ libstdc++-v3/include/bits/version.def       2026-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      2026-04-14 21:13:35.039460718 +0200\n> +++ libstdc++-v3/include/bits/version.h 2026-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    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>  #include <array>\n>  #include <initializer_list>\n> --- libstdc++-v3/src/c++23/std.cc.in.jj 2026-04-10 08:45:20.742811345 +0200\n> +++ libstdc++-v3/src/c++23/std.cc.in    2026-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>\n>\n>         Jakub\n>","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=QfNEMi6D;\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=QfNEMi6D","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\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 4g0xlX5Xr2z1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 21:27:20 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 66F0A430E6A1\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 11:27:11 +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 2538A48FEDB1\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 10:46:55 +0000 (GMT)","from mail-yx1-f72.google.com (mail-yx1-f72.google.com\n [74.125.224.72]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-643-0NlcjHaJPjCGZL5rfLBk_g-1; Wed, 22 Apr 2026 06:46:53 -0400","by mail-yx1-f72.google.com with SMTP id\n 956f58d0204a3-6501d242e5cso7133830d50.2\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 03:46:53 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 66F0A430E6A1","OpenDKIM Filter v2.11.0 sourceware.org 2538A48FEDB1"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 2538A48FEDB1","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 2538A48FEDB1","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776854815; cv=none;\n b=Pd4JGOw5leZQFy/H49jBmjqMwT0onvwtCekzCdlR3LPxM+28cdXl/AKINJQjY4Lw9d8Sbl9GqbBm33Hn5o3R4jVO8iuI90elwAFHNwLOBoFXT3Zp9cR8P7WO0uS/c6mb7z5WLJuTxbExdRmbGjUd76bNH+D18ME4K7sBVOgMBlc=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776854815; c=relaxed/simple;\n bh=3QfYT9V4UlQiOoBD3X4+y34g/GcynZeFHQbWt8uqsXo=;\n h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To;\n b=oQUTSUsLYgkfVXBpOKsDd6B2vwFf1ZKkQhnrXFV8ODkqsJNJ5WvqQCyVThwWGOaRYVs4s7upbqq/1wx/HYP5zPvOLtaHJ6DzkkS0fmEkfUHnFks6cDmGHUMNUKq+YF7WZ/0gUfYszLnD9A/hOYVLWryYZfAnJgnniP3P7mB0Lns=","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=1776854814;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=7czsNC9GI2AVrFDJDB3uDlUhVRauO/bSiUIfRcotrc8=;\n b=QfNEMi6DLi3X9iqusIM7OgWQeok2lY/PxJMjdlf2Q/grDZcVA3p1ZKYKrmaVlTGQYaIkNc\n C9FVloujEvWLAkpjUwWftLJxq7UFjC54irRtcl1nD+mUnmjmORcbavPsV6N6iDeBxwwMMN\n 2AdHJNE0XkXDvwz24Z24YJIZlJ+GxzM=","X-MC-Unique":"0NlcjHaJPjCGZL5rfLBk_g-1","X-Mimecast-MFC-AGG-ID":"0NlcjHaJPjCGZL5rfLBk_g_1776854813","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776854812; x=1777459612;\n h=cc:to:subject:message-id:date:from:in-reply-to:references\n :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=7czsNC9GI2AVrFDJDB3uDlUhVRauO/bSiUIfRcotrc8=;\n b=b9S2V4eux8WgVzBh82vQs0fVUeUV/vLOWvcaYu8QRV9Tqa6zswZW4l7Rme3VifIf0r\n CpGOfurbvy9/cvsmGXbFMj9GqlQilNOAaNTl38/BJXe+m+iYxjBrZ/zoFWxUfWRbldz4\n 7L77dk7wWvG+QmQNRqHU488VmwRT0X0tzh9ZNaHX6vJIH2sEtgkapivQJAWtSArT5hE7\n hgMxeGRlEH1WncoKftY1hXrzcDC3UxGY/4Q4hpltQ+YzGsYYxiBKT9ixU8kyXlEEQBE9\n Jy6Te2fodXDrEb374Zjf4MtrWD1epkrMOcJykJAubrmfLWp3dRlZV3CcRmEnoXQbDeY2\n eqcw==","X-Forwarded-Encrypted":"i=1;\n AFNElJ8wC4djXVpp8/7VsYJOkPUkMVdnWV9eDMYnrrDNhVW5lhRwzLD3LiPzEF+CPNQbLQc2ULhi0pLkW3136g==@gcc.gnu.org","X-Gm-Message-State":"AOJu0YxoGfzsrwViOdBbB/WAZNz8zSa+DSAnVyOaeKLd6cAqCRdVQvVr\n IKyxqac95KI3mtOBDMOEutwwFwfFAstB9WJpihVeGU4ekTkriX4ykV4BmlAlnM8oDNbkhwTj8LU\n HhZbXEzB85Lj1lgQAIVuNtUl0ncYt+rT0GIzQ722AyYfcofr9WYVqKCiXmrOtU47Enl2b4bFZwx\n ApAitinHPYGCsfyQY/WHKb2PZQDzdW9L3oYg==","X-Gm-Gg":"AeBDievyKm08t54ssfLtrZcQTp6HZjNvYXw1pbaOJr11dpWVST9W/L7Fhk5z4d6qJFo\n zjkcDDiYJNE2iy3Ln1V9TCIOY7sZcmkNnbQqVzmZegSljlEQbmIm+JJ2/YZBhUUzQKdCjC/6UK2\n gjk9GbPku4TCMRhAgAbo+DJrzwsMsoGGHybrqXH76pP8r477wVY0f0Rb2o47Sre9ET07gVfJH6U\n ftKgoAQgFa1JVLjLy6NWLLZRGaNUIwuwb051vqGq5ZSqgn/5vXkwil/j6F2ZEx+k7NLUlCwOkjV\n Jg==","X-Received":["by 2002:a53:df06:0:b0:652:541e:9681 with SMTP id\n 956f58d0204a3-653107f5a3amr15478889d50.3.1776854812595;\n Wed, 22 Apr 2026 03:46:52 -0700 (PDT)","by 2002:a53:df06:0:b0:652:541e:9681 with SMTP id\n 956f58d0204a3-653107f5a3amr15478875d50.3.1776854812110; Wed, 22 Apr 2026\n 03:46:52 -0700 (PDT)"],"MIME-Version":"1.0","References":"<aeihoaiuRwi1vH70@tucnak>\n <CACb0b4nzDuOuFnb+-WE0jWH8PQk8V3d5EbPiX3OdJ4MF9gB8mg@mail.gmail.com>\n <CACb0b4n_tMLnD3ca76vPuqoNTWFKYo=i6whsVw-9aW+Zsjwt4w@mail.gmail.com>\n <aeimmIzkde2vEIsT@tucnak>","In-Reply-To":"<aeimmIzkde2vEIsT@tucnak>","From":"Jonathan Wakely <jwakely@redhat.com>","Date":"Wed, 22 Apr 2026 11:46:36 +0100","X-Gm-Features":"AQROBzAbMRZvzJ6wvZm6r4IWknmmt4ajtTcEXF8T9Osykbn34qDvsAaNMo624m0","Message-ID":"\n <CACb0b4=b+cXD+aM47uhOYBZjAA5aJ0rbkA94GArHBrqjjmDxkQ@mail.gmail.com>","Subject":"Re: [PATCH] c++, libstc++,\n v2: Bump __cpp_impl_reflection and __cpp_lib_reflection","To":"Jakub Jelinek <jakub@redhat.com>","Cc":"Jason Merrill <jason@redhat.com>, gcc-patches@gcc.gnu.org,\n libstdc++@gcc.gnu.org","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"UDYKUMbqogc_z0k7uaCthlpMm-jtBXlRhAMMHgT4voA_1776854813","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=\"UTF-8\"","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"}}]