From: Matthias Kretz Date: Thu, 23 Feb 2023 13:45:07 +0000 (+0100) Subject: libstdc++: Fix simd test compilation with Clang X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=54f38839fad67b048f3228d88ec90ef1ee6d6893;p=people%2Fms%2Fgcc.git libstdc++: Fix simd test compilation with Clang Signed-off-by: Matthias Kretz 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 --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 } // 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 && !is_iec559) { // avoid testing subnormals and expect minor deltas for non-IEC559 float V x = 2;