]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Workaround buggy printf on Solaris in to_chars/float128_c++23.cc test...
authorJakub Jelinek <jakub@redhat.com>
Thu, 24 Nov 2022 09:37:50 +0000 (10:37 +0100)
committerJakub Jelinek <jakub@redhat.com>
Thu, 24 Nov 2022 09:37:50 +0000 (10:37 +0100)
commitd1389be011f0fac422e98e795c55156052c4d960
treea0cc609a4a03c3104d9f61dff1a0f253c57ad34d
parentadd0f941be18cdf962a0f300019acacbf2325d41
libstdc++: Workaround buggy printf on Solaris in to_chars/float128_c++23.cc test [PR107815]

As mentioned in the PR, Solaris apparently can handle right
printf ("%.0Lf\n", 1e+202L * __DBL_MAX__);
which prints 511 chars long number, but can't handle
printf ("%.0Lf\n", 1e+203L * __DBL_MAX__);
nor
printf ("%.0Lf\n", __LDBL_MAX__);
properly, instead of printing 512 chars long number for the former and
4933 chars long number for the second, it handles them as
if user asked for "%.0Le\n" in those cases.

The following patch disables the single problematic value that fails
in the test, and also fixes commented out debugging printouts.

2022-11-24  Jakub Jelinek  <jakub@redhat.com>

PR libstdc++/107815
* testsuite/20_util/to_chars/float128_c++23.cc (test): Disable
__FLT128_MAX__ test on Solaris.  Fix up commented out debugging
printouts.
libstdc++-v3/testsuite/20_util/to_chars/float128_c++23.cc