People objected to the old macro name as unclear, so it was changed at the San
Diego meeting.

Tested x86_64-pc-linux-gnu, applying to trunk.

        * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
        __cpp_conditional_explicit.
---
 gcc/c-family/c-cppbuiltin.c             | 2 +-
 gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C | 4 ++++
 gcc/c-family/ChangeLog                  | 5 +++++
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c
index e7f4c669056..8dd62158b62 100644
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -978,7 +978,7 @@ c_cpp_builtins (cpp_reader *pfile)
       if (cxx_dialect > cxx17)
        {
          /* Set feature test macros for C++2a.  */
-         cpp_define (pfile, "__cpp_explicit_bool=201806");
+         cpp_define (pfile, "__cpp_conditional_explicit=201806");
          cpp_define (pfile, "__cpp_nontype_template_parameter_class=201806");
        }
       if (flag_concepts)
diff --git a/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C 
b/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C
index faed6697382..4289bfcfa52 100644
--- a/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C
+++ b/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C
@@ -418,6 +418,10 @@
 
 // C++20 features
 
+#if __cpp_conditional_explicit != 201806
+# error "__cpp_conditional_explicit != 201806"
+#endif
+
 #if __cpp_nontype_template_parameter_class != 201806
 # error "__cpp_nontype_template_parameter_class != 201806"
 #endif
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 6ce25c97783..42bb5ca450b 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,8 @@
+2018-11-12  Jason Merrill  <ja...@redhat.com>
+
+       * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
+       __cpp_conditional_explicit.
+
 2018-11-09  Martin Sebor  <mse...@redhat.com>
 
        PR middle-end/81824

base-commit: f6b2026a461fa351cd7b97fd1865696ac0903307
-- 
2.17.2

Reply via email to