public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Stephan Bergmann <sbergman@redhat.com>
Cc: Jonathan Wakely <jwakely@redhat.com>,
	"libstdc++" <libstdc++@gcc.gnu.org>,
	 gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [committed] libstdc++: Avoid redundant checks in std::use_facet [PR103755]
Date: Sun, 13 Nov 2022 19:38:51 +0000	[thread overview]
Message-ID: <CAH6eHdQ5HuU=kS4t4543NUF8JMZfQ2EZma-s0dinhvTY3DPJuw@mail.gmail.com> (raw)
In-Reply-To: <57ee8a3e-c7b4-54ee-9274-21e387a48037@redhat.com>

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

On Sun, 13 Nov 2022, 19:23 Stephan Bergmann via Libstdc++, <
libstdc++@gcc.gnu.org> wrote:

> On 11/12/22 03:47, Jonathan Wakely wrote:
> > On Fri, 11 Nov 2022 at 21:00, Stephan Bergmann <sbergman@redhat.com>
> wrote:
> >>
> >> On 11/11/22 06:30, Jonathan Wakely via Gcc-patches wrote:
> >>> As discussed in the PR, this makes it three times faster to construct
> >>> iostreams objects.
> >>>
> >>> Tested x86_64-linux. Pushed to trunk.
> >>
> >> I haven't yet tried to track down what's going on, but with various
> >> versions of Clang (e.g. clang-15.0.4-1.fc37.x86_64):
> >>
> >>> $ cat test.cc
> >>> #include <regex>
> >>> int main(int, char ** argv) {
> >>>      std::regex_traits<char>().transform(argv[0], argv[0] + 1);
> >>> }
> >>
> >>> $ clang++ --gcc-toolchain=... -fsanitize=undefined -O2 test.cc
> >>> /usr/bin/ld: /tmp/test-c112b1.o: in function
> `std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> >
> std::__cxx11::regex_traits<char>::transform<char*>(char*, char*) const':
> >>>
> test.cc:(.text._ZNKSt7__cxx1112regex_traitsIcE9transformIPcEENS_12basic_stringIcSt11char_traitsIcESaIcEEET_S9_[_ZNKSt7__cxx1112regex_traitsIcE9transformIPcEENS_12basic_stringIcSt11char_traitsIcESaIcEEET_S9_]+0x1b):
> undefined reference to `std::__cxx11::collate<char> const*
> std::__try_use_facet<std::__cxx11::collate<char> >(std::locale const&)'
> >>> clang-15: error: linker command failed with exit code 1 (use -v to see
> invocation)
> >
> > That should be present, andis present in my builds:
> >
> > _ZSt15__try_use_facetINSt7__cxx117collateIcEEEPKT_RKSt6locale
> > std::__cxx11::collate<char> const*
> > std::__try_use_facet<std::__cxx11::collate<char> >(std::locale const&)
> > version status: compatible
> > GLIBCXX_3.4.31
> > type: function
> > status: added
> >
> > Was this a clean build, or incremental? I'm guessing the latter.
>
> Yes, indeed.  And a full rebuild fixed the issue for me.
>

Ah good.


> Sorry for the noise.
>

No problem, you do a good job of keeping us working well with clang.

      reply	other threads:[~2022-11-13 19:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11  5:30 Jonathan Wakely
2022-11-11 21:00 ` Stephan Bergmann
2022-11-12  2:47   ` Jonathan Wakely
2022-11-13 19:22     ` Stephan Bergmann
2022-11-13 19:38       ` Jonathan Wakely [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='CAH6eHdQ5HuU=kS4t4543NUF8JMZfQ2EZma-s0dinhvTY3DPJuw@mail.gmail.com' \
    --to=jwakely.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@gcc.gnu.org \
    --cc=sbergman@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).