From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 54C3A3858D33; Thu, 1 Feb 2024 18:36:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 54C3A3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706812580; bh=tjLVqJt0VAl3zMZ+QRnjmyGqVrgJrQraRGsqw4s80Hg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GPHo2PXCX355QwMxPNgIWvUCQWiHi/iVqlSrwZ9b3XFSUZPWgakH3uutAe71TUfq/ skIjUi8BniC2g9Ry8m+VLaIiDOyAulFPvNlKRhqDjKZgqirIB3C0tR/oHqJrtBShFX haotiNfNhUX9UOod7aNGPXWsvJwiAtpvJgsEGvvY= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBsaWJzdGRjKysvMTA4NjM2XSBbMTAgUmVncmVzc2lvbl0g?= =?UTF-8?B?QysrMjAgdW5kZWZpbmVkIHJlZmVyZW5jZSB0byBgc3RkOjpmaWxlc3lzdGVt?= =?UTF-8?B?OjpfX2N4eDExOjpwYXRoOjpfTGlzdDo6dHlwZShzdGQ6OmZpbGVzeXN0ZW06?= =?UTF-8?B?Ol9fY3h4MTE6OnBhdGg6Ol9UeXBlKScgd2l0aCAtZmtlZXAtaW5saW5lLWZ1?= =?UTF-8?B?bmN0aW9ucw==?= Date: Thu, 01 Feb 2024 18:36:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: link-failure X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D108636 --- Comment #10 from Jonathan Wakely --- Yes, that's explained above: (In reply to GCC Commits from comment #3) > On trunk there is a second problem, which is that the new equality > operators for comparing directory iterators with default_sentinel use > the shared_ptr::operator bool() conversion operator. The shared_ptr > specializations used by directory iterators are explicitly instantiat= ed > in the library, but the bool conversion operators are not exported. T= his > causes linker errors at -O0 or with -fkeep-inline-functions. That just > requires the conversion operators to be exported. That was fixed by this part: > * config/abi/pre/gnu.ver (GLIBCXX_3.4.31): Export shared_ptr > conversion operators for directory iterator comparisons with > std::default_sentinel_t. But that can't be backported to the gcc-12 branch as it would change the AB= I of the libstdc++.so.6.0.30 shared library. I think this would solve the problem with -fkeep-inline-functions: --- a/libstdc++-v3/include/bits/shared_ptr_base.h +++ b/libstdc++-v3/include/bits/shared_ptr_base.h @@ -1666,6 +1666,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return _M_ptr; } /// Return true if the stored pointer is not null. +#if __cplusplus >=3D 202002L + [[__gnu__::__always_inline__]] +#endif explicit operator bool() const noexcept { return _M_ptr !=3D nullptr; } We would only need that on the gcc-12 branch, since it works elsewhere.=