From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BBE4C38708E1; Sat, 15 Jun 2024 12:58:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BBE4C38708E1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1718456331; bh=D9h6q9snhBgKnd9O6kVPwNa2HRBwMkOufCTimy6zZVY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bPxR6000ElaAlfrwZuTb5i2R+ct2FaGCt6dHRUG21LQMzLOlZaxRZ77Le2IFVl8MK 1FCt4ptJWlZOlNoOwvx1Y5IZL7uW1f7glCRSzspGgEmsqfJFY7c9oZiCtk01ckist9 vjos8ES3pbEcEmfbS8je9mSocnmVdmb1uun4QozU= From: "arthur.j.odwyer at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/115497] [15 Regression] __is_pointer doesn't compile with clang since 014879ea4c86b3b8ab6b61a1226ee5b31e816c8b Date: Sat, 15 Jun 2024 12:58:51 +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: 15.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: arthur.j.odwyer at gmail dot com 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: 15.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D115497 Arthur O'Dwyer changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.j.odwyer at gmail d= ot com --- Comment #8 from Arthur O'Dwyer --- FWIW, I also ran into this, this morning. Reduced: https://godbolt.org/z/rxYKTqKd4 Organically in Abseil: https://godbolt.org/z/9eoqKzYjc (This happens because Abseil #includes before (alphabetically). If you switch the order of those two includes, it Just Works.) IMVHO libstdc++ should do jwakely's idea of #include from the offending header file; that's the most foolproof O(1) solution, rather than= the O(N) solution of being really careful to always write `bool(__is_foo(T))` instead of `__is_foo(T)`. Also, there are definitely third-party libraries (like Abseil) out there who legitimately want to use `__is_pointer(T)` in t= heir own code, and right now they have no idea that they ought to write all their uses with an extra `bool` cast just to work around a problematic interaction between Clang and libstdc++ (a mode they probably don't even build in their CI). So fixing the problem once and for all on libstdc++'s side of the fence would be really helpful.=