diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2016-08-17 14:39:05 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2016-08-17 14:39:05 +0100 |
commit | c42966921a2897c2a2a52d60b3b029ba63858391 (patch) | |
tree | 92d109fd48381e0283c568f4b2c99740f4442a42 | |
parent | ba364478df0735b8e7fa1ee1e7711a385b4d2db0 (diff) | |
download | gcc-c42966921a2897c2a2a52d60b3b029ba63858391.zip gcc-c42966921a2897c2a2a52d60b3b029ba63858391.tar.gz gcc-c42966921a2897c2a2a52d60b3b029ba63858391.tar.bz2 |
Adjust testcases for C++17 compatibility
* testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc: Disable
test for C++17.
* testsuite/experimental/chrono/value.cc: Avoid ambiguities in C++17.
* testsuite/experimental/ratio/value.cc: Likewise.
* testsuite/ext/pb_ds/regression/hash_map_rand.cc: Disable test for
C++17.
* testsuite/ext/pb_ds/regression/hash_set_rand.cc: Likewise.
* testsuite/ext/pb_ds/regression/list_update_map_rand.cc: Likewise.
* testsuite/ext/pb_ds/regression/list_update_set_rand.cc: Likewise.
* testsuite/ext/pb_ds/regression/priority_queue_rand.cc: Likewise.
* testsuite/ext/pb_ds/regression/tree_map_rand.cc: Likewise.
* testsuite/ext/pb_ds/regression/tree_set_rand.cc: Likewise.
* testsuite/ext/pb_ds/regression/trie_map_rand.cc: Likewise.
* testsuite/ext/pb_ds/regression/trie_set_rand.cc: Likewise.
* testsuite/tr1/5_numerical_facilities/special_functions/
10_cyl_bessel_k/airy.cc: Adjust namespace of __detail::__airy for
C++17 compatibility.
From-SVN: r239534
14 files changed, 58 insertions, 11 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 2016a95..be50c0d 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,23 @@ 2016-08-17 Jonathan Wakely <jwakely@redhat.com> + * testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc: Disable + test for C++17. + * testsuite/experimental/chrono/value.cc: Avoid ambiguities in C++17. + * testsuite/experimental/ratio/value.cc: Likewise. + * testsuite/ext/pb_ds/regression/hash_map_rand.cc: Disable test for + C++17. + * testsuite/ext/pb_ds/regression/hash_set_rand.cc: Likewise. + * testsuite/ext/pb_ds/regression/list_update_map_rand.cc: Likewise. + * testsuite/ext/pb_ds/regression/list_update_set_rand.cc: Likewise. + * testsuite/ext/pb_ds/regression/priority_queue_rand.cc: Likewise. + * testsuite/ext/pb_ds/regression/tree_map_rand.cc: Likewise. + * testsuite/ext/pb_ds/regression/tree_set_rand.cc: Likewise. + * testsuite/ext/pb_ds/regression/trie_map_rand.cc: Likewise. + * testsuite/ext/pb_ds/regression/trie_set_rand.cc: Likewise. + * testsuite/tr1/5_numerical_facilities/special_functions/ + 10_cyl_bessel_k/airy.cc: Adjust namespace of __detail::__airy for + C++17 compatibility. + * testsuite/24_iterators/headers/iterator/range_access.cc: Adjust expected signatures for C++14 compatibility. diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc index 8910c7e..14be447 100644 --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc @@ -1,5 +1,4 @@ -// { dg-options "-std=gnu++11" } -// { dg-do compile } +// { dg-do compile { target { ! c++1z } } } // Copyright (C) 2007-2016 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/experimental/chrono/value.cc b/libstdc++-v3/testsuite/experimental/chrono/value.cc index 80117fd5..64c16fea 100644 --- a/libstdc++-v3/testsuite/experimental/chrono/value.cc +++ b/libstdc++-v3/testsuite/experimental/chrono/value.cc @@ -1,5 +1,4 @@ -// { dg-options "-std=gnu++14" } -// { dg-do compile } +// { dg-do compile { target c++14 } } // Copyright (C) 2014-2016 Free Software Foundation, Inc. // @@ -20,8 +19,8 @@ #include <experimental/chrono> -using namespace std::chrono; -using namespace std::chrono::experimental; +using std::chrono::treat_as_floating_point; +using std::chrono::experimental::treat_as_floating_point_v; // These tests are rather simple, the front-end tests already test // variable templates, and the library tests for the underlying diff --git a/libstdc++-v3/testsuite/experimental/ratio/value.cc b/libstdc++-v3/testsuite/experimental/ratio/value.cc index 4c8a7f0..17a732b 100644 --- a/libstdc++-v3/testsuite/experimental/ratio/value.cc +++ b/libstdc++-v3/testsuite/experimental/ratio/value.cc @@ -1,5 +1,4 @@ -// { dg-options "-std=gnu++14" } -// { dg-do compile } +// { dg-do compile { target c++14 } } // Copyright (C) 2014-2016 Free Software Foundation, Inc. // @@ -20,8 +19,19 @@ #include <experimental/ratio> -using namespace std; -using namespace std::experimental; +using std::ratio; +using std::ratio_equal; +using std::ratio_not_equal; +using std::ratio_less; +using std::ratio_less_equal; +using std::ratio_greater; +using std::ratio_greater_equal; +using std::experimental::ratio_equal_v; +using std::experimental::ratio_not_equal_v; +using std::experimental::ratio_less_v; +using std::experimental::ratio_less_equal_v; +using std::experimental::ratio_greater_v; +using std::experimental::ratio_greater_equal_v; // These tests are rather simple, the front-end tests already test // variable templates, and the library tests for the underlying diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_map_rand.cc index f4c39e0..ce50a30 100644 --- a/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_map_rand.cc +++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_map_rand.cc @@ -1,3 +1,5 @@ +// __gnu_pbds::test::basic_type has ambiguous string conversions in C++17 +// { dg-do run { target { ! c++1z } } } // { dg-require-time "" } // This can take long on simulators, timing out the test. // { dg-options "-DITERATIONS=5" { target simulator } } diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_set_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_set_rand.cc index 52ff7dc..f476efb 100644 --- a/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_set_rand.cc +++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_set_rand.cc @@ -1,3 +1,5 @@ +// __gnu_pbds::test::basic_type has ambiguous string conversions in C++17 +// { dg-do run { target { ! c++1z } } } // { dg-require-time "" } // This can take long on simulators, timing out the test. // { dg-options "-DITERATIONS=5" { target simulator } } diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_map_rand.cc index 0ffb103..b060609 100644 --- a/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_map_rand.cc +++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_map_rand.cc @@ -1,3 +1,5 @@ +// __gnu_pbds::test::basic_type has ambiguous string conversions in C++17 +// { dg-do run { target { ! c++1z } } } // { dg-require-time "" } // -*- C++ -*- diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_set_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_set_rand.cc index ec85e1a..7ba175f 100644 --- a/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_set_rand.cc +++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_set_rand.cc @@ -1,3 +1,5 @@ +// __gnu_pbds::test::basic_type has ambiguous string conversions in C++17 +// { dg-do run { target { ! c++1z } } } // { dg-require-time "" } // -*- C++ -*- diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc index 295827e..a94d37d 100644 --- a/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc +++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc @@ -1,3 +1,5 @@ +// __gnu_pbds::test::basic_type has ambiguous string conversions in C++17 +// { dg-do run { target { ! c++1z } } } // { dg-require-time "" } // This can take long on simulators, timing out the test. // { dg-options "-DITERATIONS=5" { target simulator } } diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_map_rand.cc index 81f5de9..2a4f1749 100644 --- a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_map_rand.cc +++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_map_rand.cc @@ -1,3 +1,5 @@ +// __gnu_pbds::test::basic_type has ambiguous string conversions in C++17 +// { dg-do run { target { ! c++1z } } } // { dg-require-time "" } // This can take long on simulators, timing out the test. // { dg-options "-DITERATIONS=5" { target simulator } } diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_set_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_set_rand.cc index 0c82967..46e718d 100644 --- a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_set_rand.cc +++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_set_rand.cc @@ -1,3 +1,5 @@ +// __gnu_pbds::test::basic_type has ambiguous string conversions in C++17 +// { dg-do run { target { ! c++1z } } } // { dg-require-time "" } // This can take long on simulators, timing out the test. // { dg-options "-DITERATIONS=5" { target simulator } } diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_map_rand.cc index c363258..2286a853 100644 --- a/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_map_rand.cc +++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_map_rand.cc @@ -1,3 +1,5 @@ +// __gnu_pbds::test::basic_type has ambiguous string conversions in C++17 +// { dg-do run { target { ! c++1z } } } // { dg-require-time "" } // This can take long on simulators, timing out the test. // { dg-options "-DITERATIONS=5" { target simulator } } diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_set_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_set_rand.cc index a9a27f7..52faa6e 100644 --- a/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_set_rand.cc +++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_set_rand.cc @@ -1,3 +1,5 @@ +// __gnu_pbds::test::basic_type has ambiguous string conversions in C++17 +// { dg-do run { target { ! c++1z } } } // { dg-require-time "" } // This can take long on simulators, timing out the test. // { dg-options "-DITERATIONS=5" { target simulator } } diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/10_cyl_bessel_k/airy.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/10_cyl_bessel_k/airy.cc index 24619d5..f3aa2ed 100644 --- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/10_cyl_bessel_k/airy.cc +++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/10_cyl_bessel_k/airy.cc @@ -27,8 +27,11 @@ void test01() { - bool test __attribute__((unused)) = true; double x, Ai, Bi, Aip, Bip; x = 1.0; +#if __cplusplus <= 201402L std::tr1::__detail::__airy(x, Ai, Bi, Aip, Bip); +#else + std::__detail::__airy(x, Ai, Bi, Aip, Bip); +#endif } |