From: Jonathan Wakely Date: Sun, 31 Jul 2016 13:06:38 +0000 (+0100) Subject: Check __STRICT_ANSI__ for 128-bit arithmetic types X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2f2971492b8e4067c2b1ed90bfbc9ecf087957fb;p=gcc.git Check __STRICT_ANSI__ for 128-bit arithmetic types * testsuite/18_support/numeric_limits/40856.cc [__STRICT_ANSI__]: Do not test 128-bit types. * testsuite/20_util/is_floating_point/value.cc: Likewise. * testsuite/20_util/is_integral/value.cc: Likewise. * testsuite/20_util/is_signed/value.cc: Likewise. * testsuite/20_util/is_unsigned/value.cc: Likewise. * testsuite/20_util/make_signed/requirements/typedefs-1.cc: Likewise. * testsuite/20_util/make_signed/requirements/typedefs-2.cc: Likewise. * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: Likewise. * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: Likewise. From-SVN: r238918 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 0b15de79896..08f90de35cd 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,18 @@ 2016-07-31 Jonathan Wakely + * testsuite/18_support/numeric_limits/40856.cc [__STRICT_ANSI__]: Do + not test 128-bit types. + * testsuite/20_util/is_floating_point/value.cc: Likewise. + * testsuite/20_util/is_integral/value.cc: Likewise. + * testsuite/20_util/is_signed/value.cc: Likewise. + * testsuite/20_util/is_unsigned/value.cc: Likewise. + * testsuite/20_util/make_signed/requirements/typedefs-1.cc: Likewise. + * testsuite/20_util/make_signed/requirements/typedefs-2.cc: Likewise. + * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: + Likewise. + * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: + Likewise. + * testsuite/26_numerics/headers/cstdlib/54686.c: Rename to 54686.cc. 2016-07-29 Ville Voutilainen diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits/40856.cc b/libstdc++-v3/testsuite/18_support/numeric_limits/40856.cc index d317a3f8cbe..7577b59ea2b 100644 --- a/libstdc++-v3/testsuite/18_support/numeric_limits/40856.cc +++ b/libstdc++-v3/testsuite/18_support/numeric_limits/40856.cc @@ -21,7 +21,7 @@ #include // libstdc++/40856 -#ifdef _GLIBCXX_USE_INT128 +#if defined _GLIBCXX_USE_INT128 && ! defined __STRICT_ANSI__ static_assert(std::numeric_limits<__int128>::is_specialized == true, ""); static_assert(std::numeric_limits::is_specialized == true, ""); diff --git a/libstdc++-v3/testsuite/20_util/is_floating_point/value.cc b/libstdc++-v3/testsuite/20_util/is_floating_point/value.cc index 8ed73fcce2a..c2736fae3f7 100644 --- a/libstdc++-v3/testsuite/20_util/is_floating_point/value.cc +++ b/libstdc++-v3/testsuite/20_util/is_floating_point/value.cc @@ -47,6 +47,7 @@ void test01() static_assert(test_category(true), ""); static_assert(test_category(true), ""); +#ifndef __STRICT_ANSI__ // GNU Extensions. #ifdef _GLIBCXX_USE_FLOAT128 static_assert(test_category(true), ""); @@ -56,6 +57,7 @@ void test01() static_assert(test_category(false), ""); static_assert(test_category(false), ""); +#endif #endif // Sanity check. diff --git a/libstdc++-v3/testsuite/20_util/is_integral/value.cc b/libstdc++-v3/testsuite/20_util/is_integral/value.cc index 7d1cb9e5444..56974dcd502 100644 --- a/libstdc++-v3/testsuite/20_util/is_integral/value.cc +++ b/libstdc++-v3/testsuite/20_util/is_integral/value.cc @@ -51,6 +51,7 @@ void test01() static_assert(test_category(false), ""); static_assert(test_category(false), ""); +#ifndef __STRICT_ANSI__ // GNU Extensions. #ifdef _GLIBCXX_USE_INT128 static_assert(test_category(true), ""); @@ -59,6 +60,7 @@ void test01() #ifdef _GLIBCXX_USE_FLOAT128 static_assert(test_category(false), ""); +#endif #endif // Sanity check. diff --git a/libstdc++-v3/testsuite/20_util/is_signed/value.cc b/libstdc++-v3/testsuite/20_util/is_signed/value.cc index ab09d0cb4b3..2e251035faa 100644 --- a/libstdc++-v3/testsuite/20_util/is_signed/value.cc +++ b/libstdc++-v3/testsuite/20_util/is_signed/value.cc @@ -50,6 +50,7 @@ void test01() static_assert(test_category(true), ""); static_assert(test_category(true), ""); +#ifndef __STRICT_ANSI__ // GNU Extensions. #ifdef _GLIBCXX_USE_INT128 static_assert(test_category(true), ""); @@ -58,6 +59,7 @@ void test01() #ifdef _GLIBCXX_USE_FLOAT128 static_assert(test_category(true), ""); +#endif #endif // Sanity check. diff --git a/libstdc++-v3/testsuite/20_util/is_unsigned/value.cc b/libstdc++-v3/testsuite/20_util/is_unsigned/value.cc index 3ced5bb730f..75bec3b379a 100644 --- a/libstdc++-v3/testsuite/20_util/is_unsigned/value.cc +++ b/libstdc++-v3/testsuite/20_util/is_unsigned/value.cc @@ -50,6 +50,7 @@ void test01() static_assert(test_category(false), ""); static_assert(test_category(false), ""); +#ifndef __STRICT_ANSI__ // GNU Extensions. #ifdef _GLIBCXX_USE_INT128 static_assert(test_category(true), ""); @@ -58,6 +59,7 @@ void test01() #ifdef _GLIBCXX_USE_FLOAT128 static_assert(test_category(false), ""); +#endif #endif // Sanity check. 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 be8d4b05844..40b9fb8b73d 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 @@ -67,6 +67,7 @@ void test01() static_assert( sizeof(test24_type) == sizeof(test_enum), "make_signed makes type of same size" ); +#ifndef __STRICT_ANSI__ // GNU Extensions. #ifdef _GLIBCXX_USE_INT128 typedef make_signed::type test25_type; @@ -77,4 +78,5 @@ void test01() static_assert( is_same::value, "make_signed<__int128>" ); #endif +#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 2378db19e6a..f58e8698e17 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 @@ -60,6 +60,7 @@ void test01() typedef make_signed::type test24_type; static_assert(is_same::value, ""); +#ifndef __STRICT_ANSI__ // GNU Extensions. #ifdef _GLIBCXX_USE_INT128 typedef make_signed::type test25_type; @@ -68,4 +69,5 @@ void test01() typedef make_signed<__int128>::type test26_type; static_assert(is_same::value, ""); #endif +#endif } 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 5971cab8966..09b63bbd3f1 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 @@ -61,6 +61,7 @@ void test01() static_assert(is_unsigned::value, ""); static_assert(sizeof(test24_type) == sizeof(test_enum), ""); +#ifndef __STRICT_ANSI__ // GNU Extensions. #ifdef _GLIBCXX_USE_INT128 typedef make_unsigned::type test25_type; @@ -69,4 +70,5 @@ void test01() typedef make_unsigned<__int128>::type test26_type; static_assert(is_same::value, ""); #endif +#endif } 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 19aa5d31b49..98d8bed85ac 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 @@ -60,6 +60,7 @@ void test01() typedef make_unsigned::type test24_type; static_assert(is_same::value, ""); +#ifndef __STRICT_ANSI__ // GNU Extensions. #ifdef _GLIBCXX_USE_INT128 typedef make_unsigned::type test25_type; @@ -68,4 +69,5 @@ void test01() typedef make_unsigned<__int128>::type test26_type; static_assert(is_same::value, ""); #endif +#endif }