This test checks that the special functions in <cmath> are not declared prior to C++17. But we can remove the target selector and allow it to be tested for C++17 and later, and add target selectors to the individual dg-error directives instead.
Also rename the test to match what it actually tests. libstdc++-v3/ChangeLog: * testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc: Move to ... * testsuite/26_numerics/headers/cmath/specfun_c++17.cc: here and adjust test to be valid for all -std dialects. --- Tested x86_64-linux. ...ypes_std_c++0x_neg.cc => specfun_c++17.cc} | 47 ++++++++++--------- 1 file changed, 24 insertions(+), 23 deletions(-) rename libstdc++-v3/testsuite/26_numerics/headers/cmath/{types_std_c++0x_neg.cc => specfun_c++17.cc} (57%) diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/specfun_c++17.cc similarity index 57% rename from libstdc++-v3/testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc rename to libstdc++-v3/testsuite/26_numerics/headers/cmath/specfun_c++17.cc index 977f800a4b0..efb60ea1fbb 100644 --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/specfun_c++17.cc @@ -1,4 +1,4 @@ -// { dg-do compile { target { ! c++17 } } } +// { dg-do compile } // Copyright (C) 2007-2024 Free Software Foundation, Inc. // @@ -21,28 +21,29 @@ namespace gnu { - // C++11 changes from TR1. - using std::assoc_laguerre; // { dg-error "has not been declared" } - using std::assoc_legendre; // { dg-error "has not been declared" } - using std::beta; // { dg-error "has not been declared" } - using std::comp_ellint_1; // { dg-error "has not been declared" } - using std::comp_ellint_2; // { dg-error "has not been declared" } - using std::comp_ellint_3; // { dg-error "has not been declared" } + // C++17 additions from TR1. + using std::assoc_laguerre; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::assoc_legendre; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::beta; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::comp_ellint_1; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::comp_ellint_2; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::comp_ellint_3; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::cyl_bessel_i; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::cyl_bessel_j; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::cyl_bessel_k; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::cyl_neumann; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::ellint_1; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::ellint_2; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::ellint_3; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::expint; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::hermite; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::laguerre; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::legendre; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::riemann_zeta; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::sph_bessel; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::sph_legendre; // { dg-error "has not been declared" "" { target { ! c++17 } } } + using std::sph_neumann; // { dg-error "has not been declared" "" { target { ! c++17 } } } + // These two were in TR1 but not added to C++17. using std::conf_hyperg; // { dg-error "has not been declared" } - using std::cyl_bessel_i; // { dg-error "has not been declared" } - using std::cyl_bessel_j; // { dg-error "has not been declared" } - using std::cyl_bessel_k; // { dg-error "has not been declared" } - using std::cyl_neumann; // { dg-error "has not been declared" } - using std::ellint_1; // { dg-error "has not been declared" } - using std::ellint_2; // { dg-error "has not been declared" } - using std::ellint_3; // { dg-error "has not been declared" } - using std::expint; // { dg-error "has not been declared" } - using std::hermite; // { dg-error "has not been declared" } using std::hyperg; // { dg-error "has not been declared" } - using std::laguerre; // { dg-error "has not been declared" } - using std::legendre; // { dg-error "has not been declared" } - using std::riemann_zeta; // { dg-error "has not been declared" } - using std::sph_bessel; // { dg-error "has not been declared" } - using std::sph_legendre; // { dg-error "has not been declared" } - using std::sph_neumann; // { dg-error "has not been declared" } } -- 2.46.2