public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-9304] libstdc++: Fix simd test compilation with Clang
@ 2023-03-21 11:33 Matthias Kretz
  0 siblings, 0 replies; only message in thread
From: Matthias Kretz @ 2023-03-21 11:33 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:54f38839fad67b048f3228d88ec90ef1ee6d6893

commit r12-9304-g54f38839fad67b048f3228d88ec90ef1ee6d6893
Author: Matthias Kretz <m.kretz@gsi.de>
Date:   Thu Feb 23 14:45:07 2023 +0100

    libstdc++: Fix simd test compilation with Clang
    
    Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
    
    libstdc++-v3/ChangeLog:
    
            * testsuite/experimental/simd/tests/operators.cc: Clang doesn't
            define __GCC_IEC_559. Use __STDC_IEC_559__ instead.
    
    (cherry picked from commit 25db59017f2e216a76c8a0fe4814568135f19f9a)

Diff:
---
 libstdc++-v3/testsuite/experimental/simd/tests/operators.cc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc b/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc
index eeb2be26213..020b6ee521a 100644
--- a/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc
+++ b/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc
@@ -223,7 +223,14 @@ template <typename V>
     }
 
     // divides
-    constexpr bool is_iec559 = __GCC_IEC_559 >= 2;
+    constexpr bool is_iec559 =
+#ifdef __GCC_IEC_559
+      __GCC_IEC_559 >= 2;
+#elif defined __STDC_IEC_559__
+      true;
+#else
+      false;
+#endif
     if constexpr (std::is_floating_point_v<T> && !is_iec559)
       { // avoid testing subnormals and expect minor deltas for non-IEC559 float
 	V x = 2;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-21 11:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21 11:33 [gcc r12-9304] libstdc++: Fix simd test compilation with Clang Matthias Kretz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).