This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: [rfc] patch for pr8880
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