From: "Fabien Chêne" <fabien.chene@gmail.com>
To: Jason Merrill <jason@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [Patch] PR c++/26256
Date: Fri, 23 Sep 2011 08:57:00 -0000 [thread overview]
Message-ID: <CAFH4-dhwz2eWSzrajMri_+nQLHAKB0Y8qsJa0ZMWr4HtepY1XQ@mail.gmail.com> (raw)
In-Reply-To: <4E7BB7A5.8020305@redhat.com>
2011/9/23 Jason Merrill <jason@redhat.com>:
> On 09/22/2011 05:11 PM, Fabien Chêne wrote:
>>
>> 2011/9/22 Jason Merrill<jason@redhat.com>:
>
>>> I don't, it just seemed strange to handle functions differently from
>>> other
>>> decls here. But when I look more closely I see that we're in
>>> lookup_field_1, which isn't interested in functions, so I guess we do
>>> want
>>> to ignore function using-declarations here.
>>
>> That's strange because if we do return FUNCTION_DECL, PR c++/30195 seems
>> solved.
>
> It works for that testcase, but we need to handle functions in
> lookup_fnfields_1 since it's also called from other places.
Aha, hence, I'll tackle this issue in another patch, one PR at a time !
>>> But check for is_overloaded_fn rather than just OVERLOAD. Also, it looks
>>> like the new code doesn't respect want_type.
>>
>> Er, I'm a bit lost, do you mean something like that ?
>>
>> if (TREE_CODE (field) == USING_DECL)
>> {
>> tree target_field = strip_using_decl (field);
>> if (target_field != field)
>> {
>> if (DECL_P (target_field)&& DECL_NAME (target_field) == name
>> || (is_overloaded_fn (target_field)
>> && DECL_NAME (get_first_fn (target_field)) == name))
>> {
>> if (!want_type
>> || TREE_CODE (target_field) == TYPE_DECL)
>> return target_field;
>> }
>>
>> continue;
>> }
>> }
>
> I was thinking more like
>
> tree decl = field;
> if (TREE_CODE (decl) == USING_DECL)
> {
> decl = strip_using_decl (decl);
> if (is_overloaded_fn (decl)) continue;
> }
> if (DECL_NAME (decl) == name
> ...
I should have got it... Thank you anyway.
I will update the patch accordingly at the begining of the next week, I hope.
--
Fabien
next prev parent reply other threads:[~2011-09-23 7:53 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-11 19:44 Fabien Chêne
2010-05-16 19:20 ` Fabien Chêne
2010-06-08 21:50 ` Jason Merrill
2010-06-09 9:23 ` Fabien Chêne
2010-06-09 9:23 ` Fabien Chêne
2010-06-09 12:17 ` Jason Merrill
2010-06-16 21:21 ` Fabien Chêne
2010-06-17 8:39 ` Fabien Chêne
2010-06-18 8:18 ` Jason Merrill
2010-07-30 13:42 ` Fabien Chêne
2010-08-18 19:29 ` Fabien Chêne
2010-08-20 23:29 ` Jason Merrill
2010-11-15 21:40 ` Fabien Chêne
2010-11-15 21:41 ` Fabien Chêne
2010-11-17 11:25 ` Fabien Chêne
2010-12-20 16:51 ` Fabien Chêne
2010-12-22 23:10 ` Jason Merrill
2011-03-04 8:11 ` Fabien Chêne
2011-03-05 20:07 ` Jason Merrill
2011-03-08 21:48 ` Fabien Chêne
2011-06-15 19:42 ` Fabien Chêne
2011-06-22 15:56 ` Jason Merrill
2011-09-17 18:49 ` Fabien Chêne
2011-09-20 1:53 ` Jason Merrill
2011-09-21 18:33 ` Fabien Chêne
2011-09-21 18:52 ` Fabien Chêne
2011-09-21 19:01 ` Jason Merrill
2011-09-22 10:34 ` Fabien Chêne
2011-09-22 16:50 ` Jason Merrill
2011-09-22 23:01 ` Fabien Chêne
2011-09-22 23:48 ` Jason Merrill
2011-09-23 8:57 ` Fabien Chêne [this message]
2011-09-25 20:49 ` Fabien Chêne
2011-09-25 21:05 ` Paolo Carlini
2011-09-25 21:48 ` Fabien Chêne
2011-09-25 22:35 ` Paolo Carlini
2011-09-26 1:28 ` Fabien Chêne
2011-09-26 14:28 ` Jason Merrill
2011-10-10 20:35 ` Fabien Chêne
2011-10-11 15:35 ` Jason Merrill
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=CAFH4-dhwz2eWSzrajMri_+nQLHAKB0Y8qsJa0ZMWr4HtepY1XQ@mail.gmail.com \
--to=fabien.chene@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@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).