[libcxx-commits] [libcxx] [libcxx] [test] Clarify the condition for long double hex formatting (PR #135334)
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Apr 24 05:42:38 PDT 2025
================
@@ -1846,11 +1846,26 @@ void test1() {
void test2() {
std::locale lc = std::locale::classic();
std::locale lg(lc, new my_numpunct);
-#if (defined(__APPLE__) || defined(TEST_HAS_GLIBC) || defined(__MINGW32__)) && defined(__x86_64__)
- // This test is failing on FreeBSD, possibly due to different representations
- // of the floating point numbers.
- // This test is failing in MSVC environments, where long double is equal to regular
- // double, and instead of "0x9.32c05a44p+27", this prints "0x1.26580b4880000p+30".
+#if (defined(__APPLE__) || defined(TEST_HAS_GLIBC) || defined(__MINGW32__)) && defined(__x86_64__) && \
+ __LDBL_MANT_DIG__ == 64
----------------
mstorsjo wrote:
Ok, sure - I added such a define there now; it seems to match a preexisting define `TEST_LONG_DOUBLE_IS_DOUBLE` quite well.
https://github.com/llvm/llvm-project/pull/135334
More information about the libcxx-commits
mailing list