public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r14-1651] libstdc++: Remove duplicate definition of _Float128 std::from_chars [PR110077] Date: Fri, 9 Jun 2023 12:25:59 +0000 (GMT) [thread overview] Message-ID: <20230609122559.94A463856624@sourceware.org> (raw) https://gcc.gnu.org/g:00da6bcfccbc5ab13821d8dd7334dd48c22d5702 commit r14-1651-g00da6bcfccbc5ab13821d8dd7334dd48c22d5702 Author: Jonathan Wakely <jwakely@redhat.com> Date: Fri Jun 9 11:08:03 2023 +0100 libstdc++: Remove duplicate definition of _Float128 std::from_chars [PR110077] When long double uses IEEE binary128 representation we define the _Float128 overload of std::from_chars inline in <charconv>. My changes in r14-1431-g7037e7b6e4ac41 cause it to also be defined non-inline in the library, leading to an abi-check failure for (at least) sparc and aarch64. Suppress the definition in the library if long double and _Float128 have are both IEEE binary128. libstdc++-v3/ChangeLog: PR libstdc++/110077 * src/c++17/floating_from_chars.cc (from_chars) <_Float128>: Only define if _Float128 and long double have different representations. Diff: --- libstdc++-v3/src/c++17/floating_from_chars.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/src/c++17/floating_from_chars.cc b/libstdc++-v3/src/c++17/floating_from_chars.cc index f1dd1037bf3..3152d64c67c 100644 --- a/libstdc++-v3/src/c++17/floating_from_chars.cc +++ b/libstdc++-v3/src/c++17/floating_from_chars.cc @@ -1325,7 +1325,8 @@ _ZSt10from_charsPKcS0_RDF128_St12chars_format(const char* first, __ieee128& value, chars_format fmt) noexcept __attribute__((alias ("_ZSt10from_charsPKcS0_Ru9__ieee128St12chars_format"))); -#elif defined(__FLT128_MANT_DIG__) +#elif __FLT128_MANT_DIG__ == 113 && __LDBL_MANT_DIG__ != 113 +// Overload for _Float128 is not defined inline in <charconv>, define it here. from_chars_result from_chars(const char* first, const char* last, _Float128& value, chars_format fmt) noexcept
reply other threads:[~2023-06-09 12:25 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230609122559.94A463856624@sourceware.org \ --to=redi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /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: linkBe 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).