commit 9e77fc9382dd99fb38e39bcd91b385e668c6b742
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Aug 17 00:29:39 2016 +0100
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.
@@ -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.
//
@@ -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
@@ -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
@@ -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 } }
@@ -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 } }
@@ -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++ -*-
@@ -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++ -*-
@@ -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 } }
@@ -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 } }
@@ -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 } }
@@ -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 } }
@@ -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 } }
@@ -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
}