public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Varun Kumar E <varunkumare99@gmail.com>
Cc: "libstdc++" <libstdc++@gcc.gnu.org>
Subject: Re: RTTI names for classes in anonymous namespaces.
Date: Wed, 23 Aug 2023 09:48:48 +0100	[thread overview]
Message-ID: <CAH6eHdTHvLvuKeUGHPDN4=oWAaWDa+So5i-MM5OuPvhuUfYMLA@mail.gmail.com> (raw)
In-Reply-To: <CAAJX8EnzTN_V58pR42_7wW9du2Sp4eh_TDj1CbNUD9ZmaTYFiQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 706 bytes --]

On Wed, 23 Aug 2023, 09:19 Varun Kumar E via Libstdc++, <
libstdc++@gcc.gnu.org> wrote:

>  hello all,
>
>       The RTTI names generated by gcc for classes in anonymous namespaces
> begin with the prefix asterisk(*).

      Could you please explain the reasoning behind this?


It means that type_info equality can be determined by just comparing the
const char* pointers, instead of using strcmp to match equal names.

The pointer value will be unique, so will only compare equal to itself.


As Itanium ABI
> c++ has no mention of this.
>

The Itanium ABI doesn't dictate the form of those strings.

When you call std::type_info::name() the '*' is not in the result. It's
just an implementation detail.

  reply	other threads:[~2023-08-23  8:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-23  8:19 Varun Kumar E
2023-08-23  8:48 ` Jonathan Wakely [this message]
2023-08-23  8:40 Varun Kumar E
2023-08-23  8:54 ` Jonathan Wakely
2023-08-23  8:59   ` Jonathan Wakely

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='CAH6eHdTHvLvuKeUGHPDN4=oWAaWDa+So5i-MM5OuPvhuUfYMLA@mail.gmail.com' \
    --to=jwakely.gcc@gmail.com \
    --cc=libstdc++@gcc.gnu.org \
    --cc=varunkumare99@gmail.com \
    /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).