On Mon, 2 Feb 2026, Jakub Jelinek wrote:

> On Mon, Feb 02, 2026 at 10:46:28AM -0500, Patrick Palka wrote:
> > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look
> > OK for trunk and perhaps 14/15?
> > 
> > -- >8 --
> > 
> > As per https://github.com/cplusplus/draft/pull/8450
> > 
> > gcc/c-family/ChangeLog:
> > 
> >     * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_deduction_guides to
> >     202207L for C++23.
> > 
> > gcc/testsuite/ChangeLog:
> > 
> >     * g++.dg/cpp23/feat-cxx2b.C: Adjust expected __cpp_deduction_guides
> >     value.
> 
> No changes to gcc/testsuite/g++.dg/cpp26/feat-cxx26.C ?

D'oh, I conflated the two test failures..  Here's an update patch that
I'm retesting:

-- >8 --


Subject: [PATCH] c++: update FTM for C++23 inherited CTAD

As per https://github.com/cplusplus/draft/pull/8450

gcc/c-family/ChangeLog:

        * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_deduction_guides to
        202207L for C++23.

gcc/testsuite/ChangeLog:

        * g++.dg/cpp23/feat-cxx2b.C: Adjust expected __cpp_deduction_guides
        value.
        * g++.dg/cpp26/feat-cxx26.C: Likewise.
---
 gcc/c-family/c-cppbuiltin.cc            | 4 +++-
 gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C | 4 ++--
 gcc/testsuite/g++.dg/cpp26/feat-cxx26.C | 4 ++--
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc
index 12ddfa22074c..48095988da56 100644
--- a/gcc/c-family/c-cppbuiltin.cc
+++ b/gcc/c-family/c-cppbuiltin.cc
@@ -1079,7 +1079,8 @@ c_cpp_builtins (cpp_reader *pfile)
          cpp_define (pfile, "__cpp_conditional_explicit=201806L");
          cpp_define (pfile, "__cpp_consteval=202211L");
          cpp_define (pfile, "__cpp_constinit=201907L");
-         cpp_define (pfile, "__cpp_deduction_guides=201907L");
+         if (cxx_dialect <= cxx20)
+           cpp_define (pfile, "__cpp_deduction_guides=201907L");
          cpp_define (pfile, "__cpp_nontype_template_args=201911L");
          cpp_define (pfile, "__cpp_nontype_template_parameter_class=201806L");
          cpp_define (pfile, "__cpp_impl_destroying_delete=201806L");
@@ -1096,6 +1097,7 @@ c_cpp_builtins (cpp_reader *pfile)
          cpp_define (pfile, "__cpp_auto_cast=202110L");
          if (cxx_dialect <= cxx23)
            cpp_define (pfile, "__cpp_constexpr=202211L");
+         cpp_define (pfile, "__cpp_deduction_guides=202207L");
          cpp_define (pfile, "__cpp_multidimensional_subscript=202211L");
          cpp_define (pfile, "__cpp_named_character_escapes=202207L");
          cpp_define (pfile, "__cpp_static_call_operator=202207L");
diff --git a/gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C 
b/gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C
index 4033552b2ebc..06901afadb62 100644
--- a/gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C
+++ b/gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C
@@ -353,8 +353,8 @@
 
 #ifndef __cpp_deduction_guides
 #  error "__cpp_deduction_guides"
-#elif __cpp_deduction_guides != 201907
-#  error "__cpp_deduction_guides != 201907"
+#elif __cpp_deduction_guides != 202207
+#  error "__cpp_deduction_guides != 202207"
 #endif
 
 #ifndef __cpp_if_constexpr
diff --git a/gcc/testsuite/g++.dg/cpp26/feat-cxx26.C 
b/gcc/testsuite/g++.dg/cpp26/feat-cxx26.C
index 08c0ed457af3..248116699617 100644
--- a/gcc/testsuite/g++.dg/cpp26/feat-cxx26.C
+++ b/gcc/testsuite/g++.dg/cpp26/feat-cxx26.C
@@ -353,8 +353,8 @@
 
 #ifndef __cpp_deduction_guides
 #  error "__cpp_deduction_guides"
-#elif __cpp_deduction_guides != 201907
-#  error "__cpp_deduction_guides != 201907"
+#elif __cpp_deduction_guides != 202207
+#  error "__cpp_deduction_guides != 202207"
 #endif
 
 #ifndef __cpp_if_constexpr
-- 
2.53.0.rc1.65.gea24e2c554

Reply via email to