public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Sami Wagiaalla <swagiaal@redhat.com>
Cc: archer@sourceware.org
Subject: Re: [rfc] patch for pr8880
Date: Tue, 09 Feb 2010 23:35:00 -0000	[thread overview]
Message-ID: <m3zl3iyocn.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4B71B645.2050806@redhat.com> (Sami Wagiaalla's message of "Tue, 09 Feb 2010 14:23:49 -0500")

Tom> Why not just use value_ind?

Sami> value_ind works. I just missed it :)

Totally understandable, the value API is over-large.

Sami> I could put this code in a function to be called from value_x_binop
Sami> and value_x_unop. That would at least avoid the awkward argument
Sami> counting but not earlier than that since the arguments need to have
Sami> been evaluated and/or add a check for la_language == language_cplus.

I think that sounds ok.

Tom> Also, ADL should only be done for unqualified names.
Tom> It isn't clear to me that this change satisfies that requirement.

Sami> Let me look into this. It might be a general problem I don't think gdb
Sami> ever differentiates between qualified and unqualified names

I was looking into this area a little bit recently.

c-exp.y does sometimes differentiate the cases; it will emit an OP_SCOPE
in the qualified case.  I think we do mishandle either "::name" or
"::name::name" here, in the sense that these aren't distinguished from a
name without a leading "::".  (ADL also should be avoided for something
like obj->method(), but from what I remember your changes handled ok.)

I've been sort of nosing around PR 9496 and PR 8693, but I haven't
really committed yet.  There is a big comment before the qualified_type
production that explains the problem.

I was thinking that maybe we could try to do more in the lexer and
differentiate between the kinds of qualified names there.  This is
probably simplest, though I suspect it may cause us some pain later on.

The other idea I had was to require bison and somehow use the GLR parser
feature to let us differentiate the cases.  It is a little hard to see
exactly how this would work, but I haven't looked at it too deeply yet.

Tom

  reply	other threads:[~2010-02-09 23:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-08 16:35 Sami Wagiaalla
2010-02-08 17:30 ` Tom Tromey
2010-02-09 19:23   ` Sami Wagiaalla
2010-02-09 23:35     ` Tom Tromey [this message]
2010-02-11 21:00       ` Tom Tromey
2010-02-12 15:44         ` Sami Wagiaalla
2010-02-18 19:45       ` Sami Wagiaalla
2010-02-19 23:23         ` Tom Tromey
2010-02-22 16:37           ` Sami Wagiaalla
2010-02-23 22:32             ` Tom Tromey

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=m3zl3iyocn.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=archer@sourceware.org \
    --cc=swagiaal@redhat.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).