public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jason Merrill <jason@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-7131] c++: P2493 feature test macro updates Date: Wed, 9 Feb 2022 14:41:11 +0000 (GMT) [thread overview] Message-ID: <20220209144111.BC9B03858431@sourceware.org> (raw) https://gcc.gnu.org/g:d80f2248c5962318c77624a0eab05b81c59add1b commit r12-7131-gd80f2248c5962318c77624a0eab05b81c59add1b Author: Jason Merrill <jason@redhat.com> Date: Wed Feb 9 00:30:49 2022 -0500 c++: P2493 feature test macro updates The C++ committee just updated the values of these macros to reflect some late C++20 papers that we implement but others don't yet; see PR103891. gcc/c-family/ChangeLog: * c-cppbuiltin.cc (c_cpp_builtins): Update values of __cpp_constexpr and __cpp_concepts for C++20. gcc/testsuite/ChangeLog: * g++.dg/cpp23/feat-cxx2b.C: Adjust. * g++.dg/cpp2a/feat-cxx2a.C: Adjust. Diff: --- gcc/c-family/c-cppbuiltin.cc | 4 ++-- gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C | 4 ++-- gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc index 528211cf50e..4672ae8486a 100644 --- a/gcc/c-family/c-cppbuiltin.cc +++ b/gcc/c-family/c-cppbuiltin.cc @@ -1059,7 +1059,7 @@ c_cpp_builtins (cpp_reader *pfile) cpp_define (pfile, "__cpp_generic_lambdas=201707L"); cpp_define (pfile, "__cpp_designated_initializers=201707L"); if (cxx_dialect <= cxx20) - cpp_define (pfile, "__cpp_constexpr=201907L"); + cpp_define (pfile, "__cpp_constexpr=202002L"); cpp_define (pfile, "__cpp_constexpr_in_decltype=201711L"); cpp_define (pfile, "__cpp_conditional_explicit=201806L"); cpp_define (pfile, "__cpp_consteval=201811L"); @@ -1084,7 +1084,7 @@ c_cpp_builtins (cpp_reader *pfile) if (flag_concepts) { if (cxx_dialect >= cxx20) - cpp_define (pfile, "__cpp_concepts=201907L"); + cpp_define (pfile, "__cpp_concepts=202002L"); else cpp_define (pfile, "__cpp_concepts=201507L"); } diff --git a/gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C b/gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C index 923e6bcf65e..c1f91e78e66 100644 --- a/gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C +++ b/gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C @@ -528,8 +528,8 @@ #ifndef __cpp_concepts # error "__cpp_concepts" -#elif __cpp_concepts != 201907 -# error "__cpp_concepts != 201907" +#elif __cpp_concepts != 202002 +# error "__cpp_concepts != 202002" #endif #ifndef __cpp_using_enum diff --git a/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C b/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C index 3239df824fc..c65ea6bf48a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C +++ b/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C @@ -134,8 +134,8 @@ #ifndef __cpp_constexpr # error "__cpp_constexpr" -#elif __cpp_constexpr != 201907 -# error "__cpp_constexpr != 201907" +#elif __cpp_constexpr != 202002 +# error "__cpp_constexpr != 202002" #endif #ifndef __cpp_decltype_auto @@ -528,8 +528,8 @@ #ifndef __cpp_concepts # error "__cpp_concepts" -#elif __cpp_concepts != 201907 -# error "__cpp_concepts != 201907" +#elif __cpp_concepts != 202002 +# error "__cpp_concepts != 202002" #endif #ifndef __cpp_using_enum
reply other threads:[~2022-02-09 14:41 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220209144111.BC9B03858431@sourceware.org \ --to=jason@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).