From: sami wagiaalla <swagiaal@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [patch] function eval cleanup
Date: Mon, 19 Jul 2010 15:28:00 -0000 [thread overview]
Message-ID: <4C446F00.5060709@redhat.com> (raw)
In-Reply-To: <m3630hmzye.fsf@fleche.redhat.com>
> You didn't mention how you tested this...
>
This was tested by running the test suit on Fedora 13 with gcc 4.4.4 on
x8664.
> Sami> + /* If this is a C++ function wait until overload resolution. */
> Sami> + if (overload_resolution
> Sami> + && (exp->language_defn->la_language == language_cplus))
> Sami> {
> Sami> - for (; tem<= nargs&& tem<= TYPE_NFIELDS (type); tem++)
> Sami> + (*pos) += 4; /* Skip the evaluation of the symbol. */
>
> Why is it ok to add 4 here?
> I think this assumes that the function in question is a symbol.
> But is that always the case? What about something like calling via a
> function pointer? Or some other more complicated subexpression?
>
In this particular location and if the language is C++ we are dealing
with an OP_VAR_VALUE since all the other constructs were eliminated by
the if else chain. So it is always a symbol, but I could add a check for
OP_VAR_VALUE before skipping evaluation.
> If there is a failing case here, and it was not caught by the test
> suite, please also add a regression test.
>
No, no failing case. Just the FIXME by pai. It is kind of tricky to test
because whatever symbol is evaluated here is replace by overload
reslution and quietly re-evaluated.
It only causes problems when meta-symbol for templates is introduced as
it is not meant to be evaluated see patch 2 of Template Lookup.
next prev parent reply other threads:[~2010-07-19 15:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-12 18:51 sami wagiaalla
2010-07-14 23:00 ` Tom Tromey
2010-07-19 15:28 ` sami wagiaalla [this message]
2010-07-20 19:05 ` sami wagiaalla
2010-07-20 19:57 ` 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=4C446F00.5060709@redhat.com \
--to=swagiaal@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