diff options
author | Patrick Palka <ppalka@redhat.com> | 2023-05-15 12:01:07 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2023-05-15 12:01:07 -0400 |
commit | 32b81d897629b6c3bd9e2780831a1c45b38b5ac3 (patch) | |
tree | 0abc991788126e788ad7cbe6355f8d2f45210a87 /gcc/c-family/c-cppbuiltin.cc | |
parent | 5ed880788ba33302de5d78574464201e0fecbc70 (diff) | |
download | gcc-32b81d897629b6c3bd9e2780831a1c45b38b5ac3.zip gcc-32b81d897629b6c3bd9e2780831a1c45b38b5ac3.tar.gz gcc-32b81d897629b6c3bd9e2780831a1c45b38b5ac3.tar.bz2 |
c++: add feature-test macro for auto(x)
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.
Diffstat (limited to 'gcc/c-family/c-cppbuiltin.cc')
-rw-r--r-- | gcc/c-family/c-cppbuiltin.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc index 98f5aef..5d64625 100644 --- a/gcc/c-family/c-cppbuiltin.cc +++ b/gcc/c-family/c-cppbuiltin.cc @@ -1074,6 +1074,7 @@ c_cpp_builtins (cpp_reader *pfile) /* 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"); |