This adds the feature-test macro for PR0849R8, as per
https://github.com/cplusplus/CWG/issues/281.
gcc/c-family/ChangeLog:
* c-cppbuiltin.cc (c_cpp_builtins): Predefine __cpp_auto_cast
for C++23.
gcc/testsuite/ChangeLog:
* g++.dg/cpp23/feat-cxx2b.C: Test __cpp_auto_cast.
/* Set feature test macros for C++23. */
cpp_define (pfile, "__cpp_size_t_suffix=202011L");
cpp_define (pfile, "__cpp_if_consteval=202106L");
+ cpp_define (pfile, "__cpp_auto_cast=202110L");
cpp_define (pfile, "__cpp_constexpr=202211L");
cpp_define (pfile, "__cpp_multidimensional_subscript=202211L");
cpp_define (pfile, "__cpp_named_character_escapes=202207L");
# error "__cpp_implicit_move != 202207"
#endif
+#ifndef __cpp_auto_cast
+# error "__cpp_auto_cast"
+#elif __cpp_auto_cast != 202110
+# error "__cpp_auto_cast != 202110"
+#endif
+
// C++23 attributes:
#ifdef __has_cpp_attribute