From bb85ec6e3a530dd1264a11a76fb95a87850651fc Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 23 Jun 2014 19:17:03 +0100 Subject: [PATCH] re PR libstdc++/61532 (make_signed and make_unsigned wchar_t have started failing in the libstdc++ testsuite.) PR libstdc++/61532 * testsuite/20_util/make_signed/requirements/typedefs-1.cc: Do not apply the signed specifier to wchar_t. * testsuite/20_util/make_signed/requirements/typedefs-2.cc: Likewise. * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: Check cv-qualifier and size. * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: Likewise. From-SVN: r211909 --- libstdc++-v3/ChangeLog | 9 +++++++++ .../20_util/make_signed/requirements/typedefs-1.cc | 5 ++++- .../20_util/make_signed/requirements/typedefs-2.cc | 6 +++++- .../20_util/make_unsigned/requirements/typedefs-1.cc | 5 ++++- .../20_util/make_unsigned/requirements/typedefs-2.cc | 5 ++++- 5 files changed, 26 insertions(+), 4 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 4c67c60d36f..9d344d1bcd5 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -5,6 +5,15 @@ * testsuite/20_util/duration/literals/values.cc: Test non-positive values and digit separators. + PR libstdc++/61532 + * testsuite/20_util/make_signed/requirements/typedefs-1.cc: Do not + apply the signed specifier to wchar_t. + * testsuite/20_util/make_signed/requirements/typedefs-2.cc: Likewise. + * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: Check + cv-qualifier and size. + * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: + Likewise. + 2014-06-18 Paolo Carlini Ramana Radhakrishnan diff --git a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-1.cc b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-1.cc index e3b84d649aa..5b094d9a4f9 100644 --- a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-1.cc +++ b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-1.cc @@ -29,6 +29,7 @@ void test01() using std::make_signed; using std::is_same; using std::is_signed; + using std::is_volatile; // Positive tests. typedef make_signed::type test2_type; @@ -53,7 +54,9 @@ void test01() #ifdef _GLIBCXX_USE_WCHAR_T typedef make_signed::type test23_type; - static_assert( is_same::value, + static_assert( is_signed::value + && is_volatile::value + && sizeof(test23_type) == sizeof(volatile wchar_t), "make_signed" ); #endif diff --git a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc index 654b3759ca0..3f47dba5bf0 100644 --- a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc +++ b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc @@ -30,6 +30,8 @@ void test01() { using std::make_signed; using std::is_same; + using std::is_signed; + using std::is_volatile; // Positive tests. typedef make_signed::type test2_type; @@ -50,7 +52,9 @@ void test01() #ifdef _GLIBCXX_USE_WCHAR_T typedef make_signed::type test23_type; - static_assert(is_same::value, ""); + static_assert(is_signed::value + && is_volatile::value + && sizeof(test23_type) == sizeof(volatile wchar_t), ""); #endif typedef make_signed::type test24_type; diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc index d9f13aabb80..de655048fdf 100644 --- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc +++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc @@ -29,6 +29,7 @@ void test01() using std::make_unsigned; using std::is_same; using std::is_unsigned; + using std::is_volatile; // Positive tests. typedef make_unsigned::type test2_type; @@ -49,7 +50,9 @@ void test01() #ifdef _GLIBCXX_USE_WCHAR_T typedef make_unsigned::type test23_type; - static_assert(is_unsigned::value, ""); + static_assert(is_unsigned::value + && is_volatile::value + && sizeof(test23_type) == sizeof(volatile wchar_t), ""); #endif // Chapter 48, chapter 20. Smallest rank such that new unsigned type diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc index 807e2bf3f69..7801dca94c5 100644 --- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc +++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc @@ -31,6 +31,7 @@ void test01() using std::make_unsigned; using std::is_same; using std::is_unsigned; + using std::is_volatile; // Positive tests. typedef make_unsigned::type test2_type; @@ -51,7 +52,9 @@ void test01() #ifdef _GLIBCXX_USE_WCHAR_T typedef make_unsigned::type test23_type; - static_assert(is_unsigned::value, ""); + static_assert(is_unsigned::value + && is_volatile::value + && sizeof(test23_type) == sizeof(volatile wchar_t), ""); #endif typedef make_unsigned::type test24_type;