public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: Patrick Palka <ppalka@redhat.com>,
	libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] libstdc++: Remove extern "C" from Ryu sources
Date: Tue, 11 May 2021 19:12:02 +0200	[thread overview]
Message-ID: <20210511171202.GK1179226@tucnak> (raw)
In-Reply-To: <20210511170719.GY3008@redhat.com>

On Tue, May 11, 2021 at 06:07:19PM +0100, Jonathan Wakely via Gcc-patches wrote:
> > I'm not sure if the abort call is necessary since the link step already
> > fails with a multiple definition error (without the fix) even if the
> > function is defined with an empty body.  But since Jakub included an
> > abort call in his testcase I carried it over :)  Shall I just make it
> > dg-do run, or perhaps keep it dg-do link and make the function body
> > empty?  Either seems to do the right thing.
> 
> OK, if it works as-is then let's leave it as a link test. I think
> having the abort there is likely to confuse me again in future when I
> forget this conversation, so let's go with an empty body.

When mentioning it on IRC, I didn't think of it failing already at link
time, had the mental model of binary + shared library that just exports
that symbol, so kind like a small shared library containing that
std::to_chars(x, x+64, 42.L, std::chars_format::scientific); in some
function, linked with -shared -fpic -static-libstdc++ and then
binary with that generic_to_chars function extern "C" and main calling
the shared library case.

In the end, both that and the dg-do link testcase should catch it fine.

	Jakub


      reply	other threads:[~2021-05-11 17:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 14:24 Patrick Palka
2021-05-11 15:16 ` Patrick Palka
2021-05-11 16:51   ` Jonathan Wakely
2021-05-11 17:04     ` Patrick Palka
2021-05-11 17:07       ` Jonathan Wakely
2021-05-11 17:12         ` Jakub Jelinek [this message]

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=20210511171202.GK1179226@tucnak \
    --to=jakub@redhat.com \
    --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).