From: Tom Tromey <tromey@redhat.com>
To: Chris Moller <cmoller@redhat.com>
Cc: "gdb-patches\@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [patch] pr11594
Date: Wed, 23 Jun 2010 17:38:00 -0000 [thread overview]
Message-ID: <m3hbktbqeg.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4C2115AE.408@redhat.com> (Chris Moller's message of "Tue, 22 Jun 2010 15:57:34 -0400")
>>>>> "Chris" == Chris Moller <cmoller@redhat.com> writes:
Chris> The value_x_binop() result is checked because binop_user_defined_p()
Chris> only asserts that it's possible for the operands to represent an
Chris> overload, not that there is in fact an overload in this instance.
Chris> That's apparently determined in value_x_binop() and if the operator
Chris> isn't overloaded, I'm defaulting back to non-overloaded behaviour.
Chris> (It seems to me that the language check ought to be in
Chris> binop_user_defined_p() or binop_types_user_defined_p()--is there ever
Chris> a circumstance other than language_cplus where you can have
Chris> overloaded operators?)
I don't know of a case.
I couldn't see when value_x_binop can actually return NULL. It didn't
happen for any of the tests in your .exp.
Another thing to consider are cases like "print 5,x" and "print x,5" in
your test. These are both valid expressions (g++ accepts them), but
with your patch gdb errors out on at least the first one.
I think your test should also include a test of non-member "operator,".
Tom
prev parent reply other threads:[~2010-06-23 17:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-22 12:11 Chris Moller
2010-06-22 18:38 ` Tom Tromey
2010-06-22 19:57 ` Chris Moller
2010-06-23 17:38 ` Tom Tromey [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=m3hbktbqeg.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=cmoller@redhat.com \
--cc=gdb-patches@sourceware.org \
/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