[gcc/devel/omp/gcc-9] Use standard <float.h> macros in test

Tobias Burnus burnus@gcc.gnu.org
Thu Mar 5 14:13:00 GMT 2020


https://gcc.gnu.org/g:b9d801662eda455184dbf01d5007f27bae1fd2b9

commit b9d801662eda455184dbf01d5007f27bae1fd2b9
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Jul 31 20:56:19 2019 +0100

    Use standard <float.h> macros in test
    
    The <float.h> changes to define these for C++ have been backported, so
    the test can use them now.
    
    	* testsuite/26_numerics/midpoint/floating.cc: Use standard macros
    	instead of GCC-specific ones.
    
    From-SVN: r273950

Diff:
---
 libstdc++-v3/ChangeLog                                  | 3 +++
 libstdc++-v3/testsuite/26_numerics/midpoint/floating.cc | 6 +++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 04aefd3..c93869d 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,8 @@
 2019-07-31  Jonathan Wakely  <jwakely@redhat.com>
 
+	* testsuite/26_numerics/midpoint/floating.cc: Use standard macros
+	instead of GCC-specific ones.
+
 	Backport from mainline
 	2019-06-24  Jonathan Wakely  <jwakely@redhat.com>
 
diff --git a/libstdc++-v3/testsuite/26_numerics/midpoint/floating.cc b/libstdc++-v3/testsuite/26_numerics/midpoint/floating.cc
index f09f586..32a966e 100644
--- a/libstdc++-v3/testsuite/26_numerics/midpoint/floating.cc
+++ b/libstdc++-v3/testsuite/26_numerics/midpoint/floating.cc
@@ -61,13 +61,13 @@ test03()
 namespace test04
 {
   // https://gcc.gnu.org/ml/libstdc++/2019-03/msg00065.html
-  constexpr double d = DBL_MIN + __DBL_DENORM_MIN__;
+  constexpr double d = DBL_MIN + DBL_TRUE_MIN;
   static_assert( std::midpoint(d, d) == d );
 
-  constexpr float f = FLT_MIN + __FLT_DENORM_MIN__;
+  constexpr float f = FLT_MIN + FLT_TRUE_MIN;
   static_assert( std::midpoint(f, f) == f );
 
-  constexpr long double l = LDBL_MIN + __LDBL_DENORM_MIN__;
+  constexpr long double l = LDBL_MIN + LDBL_TRUE_MIN;
   static_assert( std::midpoint(l, l) == l );
 }



More information about the Libstdc++-cvs mailing list