Check __STRICT_ANSI__ for 128-bit arithmetic types
authorJonathan Wakely <jwakely@redhat.com>
Sun, 31 Jul 2016 13:06:38 +0000 (14:06 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Sun, 31 Jul 2016 13:06:38 +0000 (14:06 +0100)
* 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

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/18_support/numeric_limits/40856.cc
libstdc++-v3/testsuite/20_util/is_floating_point/value.cc
libstdc++-v3/testsuite/20_util/is_integral/value.cc
libstdc++-v3/testsuite/20_util/is_signed/value.cc
libstdc++-v3/testsuite/20_util/is_unsigned/value.cc
libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-1.cc
libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc
libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc
libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc

index 0b15de79896f0594535ced5b7d5063feedf424f1..08f90de35cdf444bb5fc2165fd5ee0af7b1d73ec 100644 (file)
@@ -1,5 +1,18 @@
 2016-07-31  Jonathan Wakely  <jwakely@redhat.com>
 
+       * 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  <ville.voutilainen@gmail.com>
index d317a3f8cbe72a7ad7130ac48c874425a0f754e1..7577b59ea2b05cc88d2365f2da6a5e48647293c8 100644 (file)
@@ -21,7 +21,7 @@
 #include <limits>
 
 // 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<unsigned __int128>::is_specialized == true,
              "");
index 8ed73fcce2a86750160e640df1639f7b71ac6d60..c2736fae3f7c1c1d7c4c2745cc758f82550427fa 100644 (file)
@@ -47,6 +47,7 @@ void test01()
   static_assert(test_category<is_floating_point, double>(true), "");
   static_assert(test_category<is_floating_point, long double>(true), "");
 
+#ifndef __STRICT_ANSI__
   // GNU Extensions.
 #ifdef _GLIBCXX_USE_FLOAT128
   static_assert(test_category<is_floating_point, __float128>(true), "");
@@ -56,6 +57,7 @@ void test01()
   static_assert(test_category<is_floating_point, __int128>(false), "");
   static_assert(test_category<is_floating_point,
                unsigned __int128>(false), "");
+#endif
 #endif
 
   // Sanity check.
index 7d1cb9e5444cdffc50127a54dda49b6574a1fdde..56974dcd5028af38441ed88d27686bb0463eb4c7 100644 (file)
@@ -51,6 +51,7 @@ void test01()
   static_assert(test_category<is_integral, double>(false), "");
   static_assert(test_category<is_integral, long double>(false), "");
 
+#ifndef __STRICT_ANSI__
   // GNU Extensions.
 #ifdef _GLIBCXX_USE_INT128
   static_assert(test_category<is_integral, __int128>(true), "");
@@ -59,6 +60,7 @@ void test01()
 
 #ifdef _GLIBCXX_USE_FLOAT128
   static_assert(test_category<is_integral, __float128>(false), "");
+#endif
 #endif
 
   // Sanity check.
index ab09d0cb4b3ee088bad79f0bc5ea4c291eabc486..2e251035faab56346dd513be39abaf8fd22e846e 100644 (file)
@@ -50,6 +50,7 @@ void test01()
   static_assert(test_category<is_signed, double>(true), "");
   static_assert(test_category<is_signed, long double>(true), "");
 
+#ifndef __STRICT_ANSI__
   // GNU Extensions.
 #ifdef _GLIBCXX_USE_INT128
   static_assert(test_category<is_signed, __int128>(true), "");
@@ -58,6 +59,7 @@ void test01()
 
 #ifdef _GLIBCXX_USE_FLOAT128
   static_assert(test_category<is_signed, __float128>(true), "");
+#endif
 #endif
 
   // Sanity check.
index 3ced5bb730f35bd31646cc2b4e8e61e99e8d3fb1..75bec3b379a8208664ebe7605087c27cdcfce18b 100644 (file)
@@ -50,6 +50,7 @@ void test01()
   static_assert(test_category<is_unsigned, double>(false), "");
   static_assert(test_category<is_unsigned, long double>(false), "");
 
+#ifndef __STRICT_ANSI__
   // GNU Extensions.
 #ifdef _GLIBCXX_USE_INT128
   static_assert(test_category<is_unsigned, unsigned __int128>(true), "");
@@ -58,6 +59,7 @@ void test01()
 
 #ifdef _GLIBCXX_USE_FLOAT128
   static_assert(test_category<is_unsigned, __float128>(false), "");
+#endif
 #endif
 
   // Sanity check.
index be8d4b05844b6b78bec2e2eea141fe84a93432b0..40b9fb8b73d186dbe88cc3615b478d01044f11e9 100644 (file)
@@ -67,6 +67,7 @@ void test01()
   static_assert( sizeof(test24_type) == sizeof(test_enum),
                  "make_signed<test_enum> makes type of same size" );
 
+#ifndef __STRICT_ANSI__
   // GNU Extensions.
 #ifdef _GLIBCXX_USE_INT128
   typedef make_signed<unsigned __int128>::type  test25_type;
@@ -77,4 +78,5 @@ void test01()
   static_assert( is_same<test26_type, __int128>::value,
                  "make_signed<__int128>" );
 #endif
+#endif
 }
index 2378db19e6ac596225f9bbd52aa72d99c291dcd1..f58e8698e171b48581fcc1856a3fef48a2365010 100644 (file)
@@ -60,6 +60,7 @@ void test01()
   typedef make_signed<test_enum>::type         test24_type;
   static_assert(is_same<test24_type, short>::value, "");
 
+#ifndef __STRICT_ANSI__
   // GNU Extensions.
 #ifdef _GLIBCXX_USE_INT128
   typedef make_signed<unsigned __int128>::type  test25_type;
@@ -68,4 +69,5 @@ void test01()
   typedef make_signed<__int128>::type                  test26_type;
   static_assert(is_same<test26_type, __int128>::value, "");
 #endif
+#endif
 }
index 5971cab896616cc1515ccec07ba0d10e865d0c55..09b63bbd3f1d77a7e83da4b3ee4bc9a7702095c0 100644 (file)
@@ -61,6 +61,7 @@ void test01()
   static_assert(is_unsigned<test24_type>::value, "");
   static_assert(sizeof(test24_type) == sizeof(test_enum), "");
 
+#ifndef __STRICT_ANSI__
   // GNU Extensions.
 #ifdef _GLIBCXX_USE_INT128
   typedef make_unsigned<unsigned __int128>::type test25_type;
@@ -69,4 +70,5 @@ void test01()
   typedef make_unsigned<__int128>::type         test26_type;
   static_assert(is_same<test26_type, unsigned __int128>::value, "");
 #endif
+#endif
 }
index 19aa5d31b4982830d27c79f5979d41da743eaca2..98d8bed85acd34f7c51a5f559c1a1dd1112fda2c 100644 (file)
@@ -60,6 +60,7 @@ void test01()
   typedef make_unsigned<test_enum>::type         test24_type;
   static_assert(is_same<test24_type, unsigned short>::value, "");
 
+#ifndef __STRICT_ANSI__
   // GNU Extensions.
 #ifdef _GLIBCXX_USE_INT128
   typedef make_unsigned<unsigned __int128>::type  test25_type;
@@ -68,4 +69,5 @@ void test01()
   typedef make_unsigned<__int128>::type          test26_type;
   static_assert(is_same<test26_type, unsigned __int128>::value, "");
 #endif
+#endif
 }