diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp @@ -13,7 +13,19 @@ // iter_type put(iter_type s, ios_base& iob, char_type fill, double v) const; // FIXME: The printf functions in Microsoft's CRT have a couple quirks in -// corner cases, failing this test. +// corner cases, failing this test: +// - With the Microsoft UCRT, printf("%#.*g", 0, 0.0) produces "0.0" while +// other C runtimes produce "0.". For other precisions than 0, Microsoft's +// consistently produce one digit more than others. In the MinGW test setups, +// the code is built with __USE_MINGW_ANSI_STDIO=1, which uses MinGW's own +// reimplementation of stdio functions, which doesn't have this issue. +// This bug requires excluding everything that runs with showpoint() enabled. +// https://developercommunity.visualstudio.com/t/printf-formatting-with-g-outputs-too/1660837 +// This issue is fixed in newer UCRT versions, since 10.0.19041.0. +// - With the Microsoft UCRT, printf("%a", 0.0) produces "0x0.0000000000000p+0" +// while other C runtimes produce just "0x0p+0". This requires omitting all +// tests of hex float formatting. +// https://developercommunity.visualstudio.com/t/Printf-formatting-of-float-as-hex-prints/1660844 // XFAIL: msvc // XFAIL: LIBCXX-AIX-FIXME diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp @@ -12,7 +12,22 @@ // iter_type put(iter_type s, ios_base& iob, char_type fill, long double v) const; -// XFAIL: LIBCXX-WINDOWS-FIXME +// FIXME: The printf functions in Microsoft's CRT have a couple quirks in +// corner cases, failing this test: +// - With the Microsoft UCRT, printf("%#.*g", 0, 0.0) produces "0.0" while +// other C runtimes produce "0.". For other precisions than 0, Microsoft's +// consistently produce one digit more than others. In the MinGW test setups, +// the code is built with __USE_MINGW_ANSI_STDIO=1, which uses MinGW's own +// reimplementation of stdio functions, which doesn't have this issue. +// This bug requires excluding everything that runs with showpoint() enabled. +// https://developercommunity.visualstudio.com/t/printf-formatting-with-g-outputs-too/1660837 +// This issue is fixed in newer UCRT versions, since 10.0.19041.0. +// - With the Microsoft UCRT, printf("%a", 0.0) produces "0x0.0000000000000p+0" +// while other C runtimes produce just "0x0p+0". This requires omitting all +// tests of hex float formatting. +// https://developercommunity.visualstudio.com/t/Printf-formatting-of-float-as-hex-prints/1660844 +// XFAIL: msvc + // XFAIL: LIBCXX-AIX-FIXME #include @@ -10717,7 +10732,7 @@ std::locale lc = std::locale::classic(); std::locale lg(lc, new my_numpunct); const my_facet f(1); -#if defined(TEST_HAS_GLIBC) +#if defined(TEST_HAS_GLIBC) || defined(_WIN32) std::string pnan_sign = "+"; std::string pnan_padding25 = "*********************"; #else @@ -24410,7 +24425,7 @@ { std::locale lc = std::locale::classic(); std::locale lg(lc, new my_numpunct); -#if (defined(__APPLE__) || defined(TEST_HAS_GLIBC)) && defined(__x86_64__) +#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. const my_facet f(1);