diff --git a/gcc/cp/cp-objcp-common.cc b/gcc/cp/cp-objcp-common.cc index f06edf04ef0..85dde0459fa 100644 --- a/gcc/cp/cp-objcp-common.cc +++ b/gcc/cp/cp-objcp-common.cc @@ -110,7 +110,6 @@ static constexpr cp_feature_info cp_feature_table[] = { "cxx_alignof", cxx11 }, { "cxx_attributes", cxx11 }, { "cxx_constexpr", cxx11 }, - { "cxx_constexpr_string_builtins", cxx11 }, { "cxx_decltype", cxx11 }, { "cxx_decltype_incomplete_return_types", cxx11 }, { "cxx_default_function_template_args", cxx11 }, diff --git a/gcc/testsuite/g++.dg/ext/has-feature2.C b/gcc/testsuite/g++.dg/ext/has-feature2.C new file mode 100644 index 00000000000..5f62916badf --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/has-feature2.C @@ -0,0 +1,14 @@ +// { dg-do compile } +// { dg-options "" } + +// PR c++/113658: we shouldn't declare support for +// cxx_constexpr_string_builtins as GCC is missing some of the builtins +// that clang implements. + +#if __has_feature (cxx_constexpr_string_builtins) +#error +#endif + +#if __has_extension (cxx_constexpr_string_builtins) +#error +#endif