libstdc++: Avoid using __float128 in strict modes
authorJonathan Wakely <jwakely@redhat.com>
Fri, 31 Jul 2020 18:58:03 +0000 (19:58 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 31 Jul 2020 18:58:03 +0000 (19:58 +0100)
libstdc++-v3/ChangeLog:

* testsuite/26_numerics/numbers/float128.cc: Check
__STRICT_ANSI__ before using __float128.
* testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc:
Likewise.

libstdc++-v3/testsuite/26_numerics/numbers/float128.cc
libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc

index 51ce21570e0d100d5392ae4f0a3bf5c9132ca5f1..421af7af67f429d2fdf1613261f28a9baf8799b0 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <numbers>
 
-#if defined(_GLIBCXX_USE_FLOAT128)
+#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128)
 void
 test01()
 {
index 1e7d649b6a7acfb248bac93fbecdfe64420390b9..9617889505fac08d6869f3ce60ace7d5575d5bf9 100644 (file)
@@ -23,7 +23,7 @@
 static_assert( std::floating_point<float> );
 static_assert( std::floating_point<double> );
 static_assert( std::floating_point<long double> );
-#ifdef _GLIBCXX_USE_FLOAT128
+#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128)
 static_assert( std::floating_point<__float128> );
 #endif