libstdc++: Make std::from_chars always round to nearest
authorJonathan Wakely <jwakely@redhat.com>
Mon, 27 Jul 2020 14:51:16 +0000 (15:51 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 27 Jul 2020 14:51:24 +0000 (15:51 +0100)
commit2251b4a5423efa8ee0d7e67537b63e404a1f6afa
treec0b930292fc1a0859bd483df8c9895297557f615
parent7355a9408b990cdd20db91e2e1ba0b03e801d6a6
libstdc++: Make std::from_chars always round to nearest

Also fix the tests that fail on targets without uselocale.

libstdc++-v3/ChangeLog:

* src/c++17/floating_from_chars.cc (from_chars_impl): Ensure
that FE_NEAREST is used.
* testsuite/20_util/from_chars/4.cc: Do not use if constexpr in
a { target c++14 } test.
[!_GLIBCXX_HAVE_USELOCALE]: Disable all tests.
* testsuite/20_util/from_chars/5.cc [!_GLIBCXX_HAVE_USELOCALE]:
Likewise.
* testsuite/20_util/from_chars/6.cc: New test.
libstdc++-v3/src/c++17/floating_from_chars.cc
libstdc++-v3/testsuite/20_util/from_chars/4.cc
libstdc++-v3/testsuite/20_util/from_chars/5.cc
libstdc++-v3/testsuite/20_util/from_chars/6.cc [new file with mode: 0644]