public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/108636] [10/11/12 Regression] C++20 undefined reference to `std::filesystem::__cxx11::path::_List::type(std::filesystem::__cxx11::path::_Type)' with -fkeep-inline-functions
Date: Tue, 21 Feb 2023 00:48:23 +0000	[thread overview]
Message-ID: <bug-108636-4-JM8mHNtORS@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108636-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108636

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:0a2597477e482df4d67db6696431286df1ff4428

commit r12-9193-g0a2597477e482df4d67db6696431286df1ff4428
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Feb 2 14:06:40 2023 +0000

    libstdc++: Fix std::filesystem errors with -fkeep-inline-functions
[PR108636]

    With -fkeep-inline-functions there are linker errors when including
    <filesystem>. This happens because there are some filesystem::path
    constructors defined inline which call non-exported functions defined in
    the library. That's usually not a problem, because those constructors
    are only called by code that's also inside the library. But when the
    header is compiled with -fkeep-inline-functions those inline functions
    are emitted even though they aren't called. That then creates an
    undefined reference to the other library internsl. The fix is to just
    move the private constructors into the library where they are called.
    That way they are never even seen by users, and so not compiled even if
    -fkeep-inline-functions is used.

    libstdc++-v3/ChangeLog:

            PR libstdc++/108636
            * include/bits/fs_path.h (path::path(string_view, _Type))
            (path::_Cmpt::_Cmpt(string_view, _Type, size_t)): Move inline
            definitions to ...
            * src/c++17/fs_path.cc: ... here.
            * testsuite/27_io/filesystem/path/108636.cc: New test.

    (cherry picked from commit db8d6fc572ec316ccfcf70b1dffe3be0b1b37212)

  parent reply	other threads:[~2023-02-21  0:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 12:03 [Bug c++/108636] New: C++20 to " hnc at singularity dot fr
2023-02-02 12:11 ` [Bug libstdc++/108636] " redi at gcc dot gnu.org
2023-02-02 13:25 ` [Bug libstdc++/108636] C++20 " redi at gcc dot gnu.org
2023-02-02 13:46 ` redi at gcc dot gnu.org
2023-02-02 16:47 ` cvs-commit at gcc dot gnu.org
2023-02-02 17:12 ` [Bug libstdc++/108636] [10/11/12 Regression] " redi at gcc dot gnu.org
2023-02-21  0:48 ` cvs-commit at gcc dot gnu.org [this message]
2023-03-16 16:51 ` [Bug libstdc++/108636] [10/11 " cvs-commit at gcc dot gnu.org
2023-03-16 17:53 ` [Bug libstdc++/108636] [10 " cvs-commit at gcc dot gnu.org
2023-03-16 17:54 ` redi at gcc dot gnu.org
2024-01-31 22:23 ` Mark_B53 at yahoo dot com
2024-02-01 18:36 ` redi at gcc dot gnu.org
2024-02-02 10:35 ` cvs-commit at gcc dot gnu.org
2024-02-02 10:40 ` redi at gcc dot gnu.org

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=bug-108636-4-JM8mHNtORS@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).