[committed] libstdc++: Fix value of __cpp_lib_format macro [PR111826]

Message ID 20231209140830.1100203-1-jwakely@redhat.com
State Committed
Headers
Series [committed] libstdc++: Fix value of __cpp_lib_format macro [PR111826] |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm warning Patch is already merged
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 warning Patch is already merged

Commit Message

Jonathan Wakely Dec. 9, 2023, 2:07 p.m. UTC
  Tested x86_64-linux. Pushed to trunk.

I'll check, but I think should be backported to gcc-13 too.

-- >8 --

As noted in the PR, we support both features required for the 202110L
value, so we should define it with that value.

libstdc++-v3/ChangeLog:

	PR libstdc++/111826
	* include/bits/version.def (format): Update value.
	* include/bits/version.h: Regenerate.
	* testsuite/std/format/functions/format.cc:
---
 libstdc++-v3/include/bits/version.def         |   4 +-
 libstdc++-v3/include/bits/version.h           | 128 +++++++++---------
 .../testsuite/std/format/functions/format.cc  |   4 +-
 3 files changed, 67 insertions(+), 69 deletions(-)
  

Patch

diff --git a/libstdc++-v3/include/bits/version.def b/libstdc++-v3/include/bits/version.def
index 140777832ed..38b73ec9b5d 100644
--- a/libstdc++-v3/include/bits/version.def
+++ b/libstdc++-v3/include/bits/version.def
@@ -1160,14 +1160,12 @@  ftms = {
   // TODO: #define __cpp_lib_format_ranges 202207L
   name = format;
   values = {
-    v = 202106;
+    v = 202110;
     cxxmin = 20;
     hosted = yes;
   };
 };
 
-// #undef __glibcxx_chrono
-// #define __glibcxx_chrono 201907L
 // FIXME: #define __glibcxx_execution 201902L
 
 ftms = {
diff --git a/libstdc++-v3/testsuite/std/format/functions/format.cc b/libstdc++-v3/testsuite/std/format/functions/format.cc
index dacc276e03c..9328dec8875 100644
--- a/libstdc++-v3/testsuite/std/format/functions/format.cc
+++ b/libstdc++-v3/testsuite/std/format/functions/format.cc
@@ -5,7 +5,7 @@ 
 
 #ifndef __cpp_lib_format
 # error "Feature test macro for std::format is missing in <format>"
-#elif __cpp_lib_format < 202106L
+#elif __cpp_lib_format < 202110L
 # error "Feature test macro for std::format has wrong value in <format>"
 #endif
 
@@ -13,7 +13,7 @@ 
 #include <version>
 #ifndef __cpp_lib_format
 # error "Feature test macro for std::format is missing in <version>"
-#elif __cpp_lib_format < 202106L
+#elif __cpp_lib_format < 202110L
 # error "Feature test macro for std::format has wrong value in <version>"
 #endif