public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: "François Dumont" <frs.dumont@gmail.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: "libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH][_GLIBCXX_INLINE_VERSION] Adapt to_chars/from_chars symbols
Date: Mon, 28 Nov 2022 19:45:27 +0100	[thread overview]
Message-ID: <5fbf8139-9f8c-9b56-eae3-8c441e6ad4ee@gmail.com> (raw)
In-Reply-To: <fa0bea1f-79c3-817c-e150-ebe46b2a3e24@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3121 bytes --]

I forgot to add the patch but as you already made another feedback I'll 
clean my patch first.


On 28/11/22 19:43, François Dumont wrote:
> On 28/11/22 11:21, Jonathan Wakely wrote:
>>
>>
>> On Mon, 28 Nov 2022 at 10:10, Jonathan Wakely <jwakely@redhat.com> wrote:
>>
>>
>>
>>     On Mon, 28 Nov 2022 at 06:07, François Dumont via Libstdc++
>>     <libstdc++@gcc.gnu.org <mailto:libstdc%2B%2B@gcc.gnu.org>> wrote:
>>
>>         This patch is fixing those tests:
>>
>>         20_util/to_chars/float128_c++23.cc
>>         std/format/formatter/requirements.cc
>>         std/format/functions/format.cc
>>         std/format/functions/format_to_n.cc
>>         std/format/functions/size.cc
>>         std/format/functions/vformat_to.cc
>>         std/format/string.cc
>>
>>         Note that symbols used in <format> for __ibm128 and __iee128
>>         are untested.
>>
>>         I even wonder if the normal mode ones are because I cannot
>>         find the
>>         symbols used in gnu.ver.
>>
>>
>>              libstdc++: [_GLIBCXX_INLINE_VERSION] Add
>>         to_chars/from_chars
>>         symbols export
>>
>>              libstdc++-v3/ChangeLog
>>
>>                      * include/std/format
>>         [_GLIBCXX_INLINE_VERSION](to_chars):
>>         Adapt __asm symbol
>>                      specifications.
>>                      * config/abi/pre/gnu-versioned-namespace.ver: Add
>>         to_chars/from_chars symbols
>>                      export.
>>
>>         Ok to commit ?
>>
>>
>>
>>     Why are changes needed to the linker script?
>>
>>     Those functions should already match the general wildcard:
>>
>>         # Names inside the 'extern' block are demangled names.
>>         extern "C++"
>>         {
>>           std::*;
>>           std::__8::*;
>>         };
>>
>>
>>
> No idear, my guess was that it has something to do with the __asm 
> usages in <format> and with the commnt:
>
>   // These overloads exist in the library, but are not declared for C++20.
>   // Make them available as std::__format::to_chars.
>
> Maybe they exist in the library but are unused so not exported unless 
> specified in the linker script ?
>
>
>>
>> Instead of nine separate #if blocks, can we just do:
>>
>> #if _GLIBCXX_INLINE_VERSION
>> # define _GLIBCXX_ALIAS(S) __asm("_ZNSt3__8" S)
>> #else
>> # define _GLIBCXX_ALIAS(S) __asm("_ZNSt" S)
>> #endif
>>
>>  And then use:
>>
>>   _GLIBCXX_ALIAS("8to_charsPcS_eSt12chars_format");
>>
>> and finally:
>>
>> #undef _GLIBCXX_ALIAS
>>
>>
> I tried and as expected it's not working because the diff in the 
> symbol is not limited to the '3__8' pattern. 'chars_format' is also 
> defined in versioned namespace which might perhaps explain some 
> mangling diff.
>
> Here is an updated patch though, I had forgotten to replace a _DF128 
> with a __ieee128 in the untested part of this patch.
>
> If you prefer to take a closer look later I'll just re-submit my patch 
> to move versioned namespace mode to cxx11 abi knowing that those tests 
> are already FAIL.
>
> François
>
>

  reply	other threads:[~2022-11-28 18:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28  6:07 François Dumont
2022-11-28 10:10 ` Jonathan Wakely
2022-11-28 10:21   ` Jonathan Wakely
2022-11-28 18:43     ` François Dumont
2022-11-28 18:45       ` François Dumont [this message]
2022-11-28 18:35 ` Jonathan Wakely
2022-11-28 20:44   ` François Dumont
2023-01-12 12:05     ` 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=5fbf8139-9f8c-9b56-eae3-8c441e6ad4ee@gmail.com \
    --to=frs.dumont@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@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: 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).