public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Hannes Domani <ssbssa@yahoo.de>
To: Tom Tromey <tom@tromey.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix reinterpret_cast for classes with multiple inheritance
Date: Wed, 20 Mar 2024 17:03:30 +0000 (UTC)	[thread overview]
Message-ID: <1615772159.11154782.1710954210939@mail.yahoo.com> (raw)
In-Reply-To: <87r0g4g7sl.fsf@tromey.com>

 Am Mittwoch, 20. März 2024 um 17:57:50 MEZ hat Tom Tromey <tom@tromey.com> Folgendes geschrieben:

> >>>>> "Hannes" == Hannes Domani <ssbssa@yahoo.de> writes:
>
> Hannes> Currently a reinterpret_cast may change the pointer value if
> Hannes> multiple inheritance is involved:
>
> Thanks for the patch.
>
> Hannes> +  else if (dest_code == TYPE_CODE_PTR && arg_code == TYPE_CODE_PTR)
> Hannes> +    {
> Hannes> +      /* Don't do any up- or downcasting.  */
> Hannes> +      result = arg->copy ();
> Hannes> +      result->deprecated_set_type (dest_type);
> Hannes> +      result->set_enclosing_type (dest_type);
> Hannes> +      result->set_pointed_to_offset (0);    /* pai: chk_val */
>
> I don't think anybody knows what this comment means in the other spots
> it appears.  I guess "pai" is some gdb maintainer from the distant past,
> though I don't know their real name.
>
> Anyway, please remove this comment.
>
> Ok with this change.
> Approved-By: Tom Tromey <tom@tromey.com>

Pushed with this change, thanks.


Hannes

      reply	other threads:[~2024-03-20 17:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240320160115.94-1-ssbssa.ref@yahoo.de>
2024-03-20 16:01 ` Hannes Domani
2024-03-20 16:57   ` Tom Tromey
2024-03-20 17:03     ` Hannes Domani [this message]

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=1615772159.11154782.1710954210939@mail.yahoo.com \
    --to=ssbssa@yahoo.de \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.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).