On Thu, 17 Dec 2020, Patrick Palka via Gcc-patches wrote:

> > >libstdc++-v3/ChangeLog:
> > >
> > >       * config/abi/pre/gnu.ver: Add new exports.
> > >       * include/std/charconv (to_chars): Declare the floating-point
> > >       overloads for float, double and long double.
> > >       * src/c++17/Makefile.am (sources): Add floating_to_chars.cc.
> > >       * src/c++17/Makefile.in: Regenerate.
> > >       * src/c++17/floating_to_chars.cc: New file.
> > >       (to_chars): Define for float, double and long double.
> > >       * testsuite/20_util/to_chars/long_double.cc: New test.
> >
> > Sorry it took so long to review, this is OK for trunk.
> >
> > The patch needs some minor changes to rebase it on the current trunk:
> > The linker script has additions since you send this patch, so the
> > context in the patch is wrong and it doesn't apply, and in <charconv>
> > the first line of context in the patch needs to have 'noexcept' added.
> > That rebase should be easy though.
> >
> > I'll look at adding __float128 support for powerpc64le.
> 
> Thanks a lot.  I committed the patch series just now, after rebasing
> and retesting on x86_64, aarch64 and ppc64le.

 This breaks with the `vax-netbsdelf' target in GCC compilation:

.../libstdc++-v3/src/c++17/floating_to_chars.cc:126:38: error: static assertion 
failed
  126 |       static_assert(__DBL_MANT_DIG__ == 53);
      |                                      ^
make[5]: *** [Makefile:577: floating_to_chars.lo] Error 1

So what's the fallback/alternative for non-IEEE-754 FP targets?  Shouldn't 
we call into libc (possibly with a warning attribute) for the formats we 
don't have explicit handcoded support for?

  Maciej

Reply via email to