[committed,5/5] libstdc++: Avoid using __float128 in strict modes

Message ID 20200731190230.GA1313230@redhat.com
State New
Headers show
Series
  • [committed,1/5] libstdc++: Ensure c++NN effective target present in all C++17 tests
Related show

Commit Message

Bill Schmidt via Gcc-patches July 31, 2020, 7:02 p.m.
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.

Tested powerpc64le-linux, committed to trunk.
commit dc8c00966ef89581447f549ebdea98dd72003fd8
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Jul 31 19:58:03 2020

    libstdc++: Avoid using __float128 in strict modes
    
    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.

Patch

diff --git a/libstdc++-v3/testsuite/26_numerics/numbers/float128.cc b/libstdc++-v3/testsuite/26_numerics/numbers/float128.cc
index 51ce21570e0..421af7af67f 100644
--- a/libstdc++-v3/testsuite/26_numerics/numbers/float128.cc
+++ b/libstdc++-v3/testsuite/26_numerics/numbers/float128.cc
@@ -20,7 +20,7 @@ 
 
 #include <numbers>
 
-#if defined(_GLIBCXX_USE_FLOAT128)
+#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128)
 void
 test01()
 {
diff --git a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc
index 1e7d649b6a7..9617889505f 100644
--- a/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc
+++ b/libstdc++-v3/testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc
@@ -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