public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-10589] libstdc++: Fix simd test compilation with Clang
@ 2023-03-21 11:34 Matthias Kretz
0 siblings, 0 replies; only message in thread
From: Matthias Kretz @ 2023-03-21 11:34 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:e320611bc743ff3f681c1a1fa4acfbdcdea1f430
commit r11-10589-ge320611bc743ff3f681c1a1fa4acfbdcdea1f430
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 171bae5b05e..d0f5a1e5ce1 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:34 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:34 [gcc r11-10589] 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).