From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 996AA3883013; Tue, 18 Jun 2024 20:00:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 996AA3883013 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1718740856; bh=mmCp9/AaJrL7R9ZznsOXU22bLUWisKj8txsl3V/ooGA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NnOwQ1vEaSTtXtlZzhtHP2BACurfx2F5p/V557pPTCAAmGdHuFYzzxtF6a5ujs3qH WxsLfuY8HaQgSanul1Xv6oZxfH45aGg3dRo8GQtzCcwNBN9Rr7dWeHHuzEKhaY0Mfa BN8p1okA70GP4d8Nntoiwf6V9Iet0VKTrKnw7ZI8= From: "richard-gccbugzilla at metafoo dot co.uk" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/115497] [15 Regression] __is_pointer doesn't compile with clang since 014879ea4c86b3b8ab6b61a1226ee5b31e816c8b Date: Tue, 18 Jun 2024 20:00:55 +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: richard-gccbugzilla at metafoo dot co.uk 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 Richard Smith changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |richard-gccbugzilla@metafoo | |.co.uk --- Comment #13 from Richard Smith --- (In reply to Jonathan Wakely from comment #10) > The only foolproof fix would be to rename the __is_pointer class template. Yes, given that Clang treats this identifier as a keyword, the best solution would be for libstdc++ to stop using it as a type name. We have an awful ha= ck in Clang to support libstdc++ doing this, and it'd be great to remove that eventually. (I apologize, we should have made this request years ago when we added the hack.) As is evidenced in this bug, this hack was only made to be good enough to support libstdc++ as it existed at the time. I'm not really sure what behav= ior one would expect from `__is_pointer(_Tp)`, given that it can parse as a type (treating `__is_pointer` as a placeholder for CTAD, which is semantically invalid in this context only because we can't perform CTAD here). We could extend our hack to support this too, but doing so is really a losing proposition. In general, we seem to have organically adopted the convention that `std::blah<...>` type traits correspond to `__blah` keywords, so it'd be gr= eat if libstdc++ didn't use any of those identifiers as type names.=