diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-23 20:29:57 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-23 20:29:57 +0000 |
commit | c3a238c3827f7597be6b5d5d072d88d0b24a9eb1 (patch) | |
tree | 5ba12f5e0732e1109be6702de1f37d72e9c54c84 | |
parent | 738d1d1eb6cffee4b8ed9db7be3fcf2e9c65258a (diff) | |
download | ppe42-gcc-c3a238c3827f7597be6b5d5d072d88d0b24a9eb1.tar.gz ppe42-gcc-c3a238c3827f7597be6b5d5d072d88d0b24a9eb1.zip |
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: Do not
apply the unsigned specifier to wchar_t.
* testsuite/20_util/make_unsigned/requirements/typedefs-2.cc:
Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@211914 138bc75d-0d04-0410-961f-82ee72b054a4
5 files changed, 29 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index f1b6ab19e6e..7662fa12fb0 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,14 @@ +2014-06-23 Jonathan Wakely <jwakely@redhat.com> + + 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: Do not + apply the unsigned specifier to wchar_t. + * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: + Likewise. + 2014-06-13 Jonathan Wakely <jwakely@redhat.com> Backport from mainline 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<const int>::type test2_type; @@ -53,7 +54,9 @@ void test01() #ifdef _GLIBCXX_USE_WCHAR_T typedef make_signed<volatile wchar_t>::type test23_type; - static_assert( is_same<test23_type, volatile signed wchar_t>::value, + static_assert( is_signed<test23_type>::value + && is_volatile<test23_type>::value + && sizeof(test23_type) == sizeof(volatile wchar_t), "make_signed<volatile wchar_t>" ); #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<const int>::type test2_type; @@ -50,7 +52,9 @@ void test01() #ifdef _GLIBCXX_USE_WCHAR_T typedef make_signed<volatile wchar_t>::type test23_type; - static_assert(is_same<test23_type, volatile signed wchar_t>::value, ""); + static_assert(is_signed<test23_type>::value + && is_volatile<test23_type>::value + && sizeof(test23_type) == sizeof(volatile wchar_t), ""); #endif typedef make_signed<test_enum>::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 a893ede133d..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<const unsigned int>::type test2_type; @@ -49,7 +50,9 @@ void test01() #ifdef _GLIBCXX_USE_WCHAR_T typedef make_unsigned<volatile wchar_t>::type test23_type; - static_assert(is_same<test23_type, volatile unsigned wchar_t>::value, ""); + static_assert(is_unsigned<test23_type>::value + && is_volatile<test23_type>::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 637b0c7ca56..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 @@ -30,6 +30,8 @@ void test01() { using std::make_unsigned; using std::is_same; + using std::is_unsigned; + using std::is_volatile; // Positive tests. typedef make_unsigned<const unsigned int>::type test2_type; @@ -50,7 +52,9 @@ void test01() #ifdef _GLIBCXX_USE_WCHAR_T typedef make_unsigned<volatile wchar_t>::type test23_type; - static_assert(is_same<test23_type, volatile unsigned wchar_t>::value, ""); + static_assert(is_unsigned<test23_type>::value + && is_volatile<test23_type>::value + && sizeof(test23_type) == sizeof(volatile wchar_t), ""); #endif typedef make_unsigned<test_enum>::type test24_type; |