From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1CECD3858D32; Tue, 11 Oct 2022 19:15:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1CECD3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665515743; bh=CC4/BIk0F3O1Y2ATXp3T0EFBH6EyFT70gxH53wqtXyU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lmzp4QBMXPtdRUqyqsyO5+gMdw0NOmElKvW1gQOP/K0hY8AQLGSW12xbfGPgE2YQs bIGYoV3ip6gry1ObB0L4TFxPQ3nFtitxjmyigzV6+TNgv52fKNHH+UKm1k53QOhDOw ZJoTVrwGUv6cqVJcq0FyFCt50OBoo1PwAFOKDgm0= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/107221] [13 Regression] libstdc++ EH no matching function __gnu_cxx::__scoped_lock::__scoped_lock Date: Tue, 11 Oct 2022 19:15:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: unknown X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: target_milestone assigned_to bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107221 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |13.0 Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu= .org Status|NEW |ASSIGNED --- Comment #2 from Jonathan Wakely --- Same place it's always been defined, in gthr.h which is included by And every other header includes i.e. all of these: #include // std::exception #include // std::terminate #include // std::malloc, std::free, std::strtoul #include // INT_MAX #include // std::less #include "unwind-cxx.h" #if _GLIBCXX_HOSTED # include // std::string_view # include // std::strchr, std::memset # include // __gnu_cxx::__mutex, __gnu_cxx::__scoped_l= ock #endif That's why I removed the unnecessary initial #include of it. This should fix it: --- a/libstdc++-v3/libsupc++/eh_alloc.cc +++ b/libstdc++-v3/libsupc++/eh_alloc.cc @@ -236,7 +236,7 @@ namespace void *pool::allocate (std::size_t size) noexcept { - __gnu_cxx::__scoped_lock sentry(emergency_mutex); + __scoped_lock sentry(emergency_mutex); // We need an additional size_t member plus the padding to // ensure proper alignment of data. size +=3D offsetof (allocated_entry, data);=