public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: Patrick Palka <ppalka@redhat.com>
Cc: Jonathan Wakely <jwakely@redhat.com>,
	Jonathan Wakely via Libstdc++ <libstdc++@gcc.gnu.org>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 3/4] libstdc++: Add floating-point std::to_chars implementation
Date: Sun, 20 Dec 2020 21:44:38 +0000 (GMT)	[thread overview]
Message-ID: <alpine.LFD.2.21.2012202126141.1637534@eddie.linux-mips.org> (raw)
In-Reply-To: <CAMOnLZbHa9B1_jjbwHJA4H621emmn=aFzjtkF7TEE1g=cPFHFA@mail.gmail.com>

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

  parent reply	other threads:[~2020-12-20 21:44 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14 19:41 [PATCH 1/4] libstdc++: Import parts of the Ryu library Patrick Palka
2020-07-14 19:41 ` [PATCH 2/4] libstdc++: Apply modifications to our local copy of Ryu Patrick Palka
2020-07-15 18:12   ` Patrick Palka
2020-12-17 14:35     ` Jonathan Wakely
2020-07-14 19:41 ` [PATCH 3/4] libstdc++: Add floating-point std::to_chars implementation Patrick Palka
2020-07-15 18:21   ` Patrick Palka
2020-07-17  4:23     ` Patrick Palka
2020-07-17 16:24       ` Patrick Palka
2020-07-20  3:37         ` Patrick Palka
2020-07-20 12:31           ` Jonathan Wakely
2020-07-20 12:53             ` Patrick Palka
2020-07-20 14:13               ` Jonathan Wakely
2020-07-20 14:46                 ` Patrick Palka
2020-07-22 15:56                   ` Patrick Palka
2020-08-19 21:57                     ` Patrick Palka
2020-12-17 14:32                       ` Jonathan Wakely
2020-12-18  4:13                         ` Patrick Palka
2020-12-18 13:24                           ` Christophe Lyon
2020-12-18 14:58                             ` Jonathan Wakely
2020-12-18 15:00                             ` Patrick Palka
2020-12-18 16:52                               ` Christophe Lyon
2020-12-18 17:03                                 ` Patrick Palka
2020-12-18 18:28                                   ` Christophe Lyon
2020-12-20 21:44                           ` Maciej W. Rozycki [this message]
2020-12-21 17:06                             ` Patrick Palka
2020-12-21 23:09                               ` Maciej W. Rozycki
2020-07-14 19:41 ` [PATCH 4/4] libstdc++: Import MSVC floating-point std::to_chars testcases Patrick Palka
2020-07-14 19:49   ` Patrick Palka
2020-12-17 14:37   ` Jonathan Wakely
2020-07-14 19:46 ` [PATCH 1/4] libstdc++: Import parts of the Ryu library Patrick Palka
2020-07-25 11:44 ` Václav Haisman
2020-07-26 13:09   ` Patrick Palka
2020-12-17 14:34 ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.21.2012202126141.1637534@eddie.linux-mips.org \
    --to=macro@linux-mips.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@gcc.gnu.org \
    --cc=ppalka@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).