public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "richard-gccbugzilla at metafoo dot co.uk" <gcc-bugzilla@gcc.gnu.org>
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 23:00:26 +0000	[thread overview]
Message-ID: <bug-115497-4-KJaeEQ8Epy@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-115497-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #15 from Richard Smith <richard-gccbugzilla at metafoo dot co.uk> ---
(In reply to Jonathan Wakely from comment #14)
> I assume clang doesn't have __is_arithmetic, __is_scalar and __is_void
> built-ins yet, because <bits/cpp_type_traits.h> also defines class templates
> with those names.

Clang has all of those
(https://github.com/llvm/llvm-project/blob/12cf0dc685a9c3adfefc3a58f0b8ed4360be8b14/clang/include/clang/Basic/TokenKinds.def#L552),
but it looks like <type_traits> happens to not use them in a way that breaks.

The specific problem with __is_pointer in <type_traits> is that it's being used
in a template argument:

    : public __bool_constant<__is_pointer(_Tp)>

... where it would be valid to parse a type. Clang's hack to treat
`__is_pointer(T)` as the builtin (after we've seen a declaration using the same
name) only applies in contexts where we know we're parsing an expression. (We
can fix this, but I think the healthier thing long-term is to treat these as
keywords everywhere.)

  parent reply	other threads:[~2024-06-18 23:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-14 20:21 [Bug libstdc++/115497] New: " mital at mitalashok dot co.uk
2024-06-14 20:33 ` [Bug libstdc++/115497] " pinskia at gcc dot gnu.org
2024-06-14 20:38 ` pinskia at gcc dot gnu.org
2024-06-14 20:44 ` pinskia at gcc dot gnu.org
2024-06-14 20:56 ` mital at mitalashok dot co.uk
2024-06-14 20:57 ` redi at gcc dot gnu.org
2024-06-14 20:58 ` redi at gcc dot gnu.org
2024-06-14 21:33 ` [Bug libstdc++/115497] [15 Regression] " pinskia at gcc dot gnu.org
2024-06-15 11:53 ` redi at gcc dot gnu.org
2024-06-15 12:58 ` arthur.j.odwyer at gmail dot com
2024-06-15 16:56 ` redi at gcc dot gnu.org
2024-06-15 16:57 ` redi at gcc dot gnu.org
2024-06-15 16:59 ` redi at gcc dot gnu.org
2024-06-15 18:23 ` pinskia at gcc dot gnu.org
2024-06-18 20:00 ` richard-gccbugzilla at metafoo dot co.uk
2024-06-18 20:15 ` redi at gcc dot gnu.org
2024-06-18 23:00 ` richard-gccbugzilla at metafoo dot co.uk [this message]
2024-06-20 15:40 ` redi at gcc dot gnu.org
2024-06-21  9:31 ` redi at gcc dot gnu.org
2024-06-21 16:07 ` cvs-commit at gcc dot gnu.org
2024-06-21 16:07 ` cvs-commit at gcc dot gnu.org
2024-06-21 16:07 ` cvs-commit at gcc dot gnu.org
2024-06-21 16:07 ` cvs-commit at gcc dot gnu.org
2024-06-21 16:07 ` cvs-commit at gcc dot gnu.org
2024-06-21 16:13 ` 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-115497-4-KJaeEQ8Epy@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).