public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Gary Benson <gbenson@redhat.com>
To: Pedro Alves <pedro@palves.net>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Reject ambiguous C++ field accesses
Date: Fri, 28 Aug 2020 15:38:59 +0100	[thread overview]
Message-ID: <20200828143859.GB15596@blade.nx> (raw)
In-Reply-To: <20200827180251.20244-1-pedro@palves.net>

Pedro Alves wrote:
> An ambiguous access is now an error instead of a warning, and also
> GDB shows you the all candidates, like:
> 
>  (gdb) print x.x
>  Request for member 'x' is ambiguous in type 'X'. Candidates are:
>    'int A1::x' (X -> A1)
>    'int A2::x' (X -> A2)
>  (gdb) print j.x
>  Request for member 'x' is ambiguous in type 'J'. Candidates are:
>    'int A1::x' (J -> K -> A1)
>    'int A1::x' (J -> L -> A1)

That's really nice, thanks for doing this!

I replied with a comment tweak in another message, but other than
that and the things Luis found, LGTM.

Thanks,
Gary

-- 
Gary Benson - he / him / his
Principal Software Engineer, Red Hat


      parent reply	other threads:[~2020-08-28 14:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-27 18:02 Pedro Alves
2020-08-27 18:45 ` Luis Machado
2020-08-27 19:12   ` Pedro Alves
2020-08-27 19:58 ` Luis Machado
2020-08-28 14:35   ` Gary Benson
2020-08-28 20:22     ` [PATCH v2] " Pedro Alves
2020-10-12 17:12       ` Pedro Alves
2020-10-13  8:47         ` Gary Benson
2020-08-28 20:12   ` [PATCH] " Pedro Alves
2020-08-28 14:38 ` Gary Benson [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=20200828143859.GB15596@blade.nx \
    --to=gbenson@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@palves.net \
    /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).