public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Matthias Kretz <mkretz@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-9304] libstdc++: Fix simd test compilation with Clang Date: Tue, 21 Mar 2023 11:33:53 +0000 (GMT) [thread overview] Message-ID: <20230321113353.D623E3858D37@sourceware.org> (raw) 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;
reply other threads:[~2023-03-21 11:33 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230321113353.D623E3858D37@sourceware.org \ --to=mkretz@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).