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: Thu, 17 Jun 2010 08:39:00 -0000 [thread overview]
Message-ID: <AANLkTimUf5BJM3CAOhtfwDAgsRn_hk7N6PgV5XmZtEU2@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimONzSNNiUarwu1vU1AhiTUf2Ug_mKJE4Ya2LXj@mail.gmail.com>
Arf, I boostraped it again yesterday and 02.gch ICEd.
The algorithm recursing on bases isn't correct, I will fix it.
And ... I've also forgotten to add the testcase for intermediate bases
in the patch.
2010/6/16 Fabien Chêne <fabien.chene@gmail.com>:
> Hi,
>
> Here is an updated patch that should address some (all ?) issues you
> have noticed.
>
> [...]
>> It seems like this only works if there is a using in the most derived class;
>> a using in an intermediate class wouldn't avoid the ambiguity.
>>
>> I'd prefer to tear out the old access declaration code and actually handle
>> USING_DECLs directly in lookup_field_r et al.
>
> I have moved the call to disambiguate_with_using_decl in
> lookup_field_r, which simplify things, thanks.
> disambiguate_with_using_decl has also been improved so that it can
> look for a using decl in an intermediate base class. Basically, it
> recurses on bases provided all using decl context classes are a base
> for the current class.
>
> [...]
>> @@ -1431,6 +1431,8 @@ dbxout_type_fields (tree type)
>> + || TREE_CODE (tem) == USING_DECL
>
>> This will break bootstrap when C++ isn't enabled. Instead, check TREE_CODE > END_OF_BASE_TREE_CODES.
>
> Sounds like it doesn't work. Instead, I've checked TREE_CODE >=
> LAST_AND_UNUSED_TREE_CODE.
>
> Bootstrapped with all default languages, and with C only.
> Tested x86_64-unknown-linux-gnu.
>
> OK for trunk ?
>
>
> gcc/ChangeLog
>
> 2010-06-15 Fabien Chêne <fabien@gcc.gnu.org>
>
> PR c++/26256
> * dbxout.c (dbxout_type_fields): Ignore using declarations.
>
>
> gcc/testsuite/ChangeLog
>
> 2010-06-15 Fabien Chêne <fabien@gcc.gnu.org>
>
> PR c++/26256
> * g++.dg/lookup/using23.C: New.
> * g++.dg/lookup/using24.C: New.
> * g++.dg/lookup/using25.C: New.
> * g++.dg/lookup/using26.C: New.
> * g++.dg/lookup/using27.C: New.
> * g++.dg/debug/using4.C: New.
> * g++.dg/debug/using5.C: New.
>
> gcc/cp/ChangeLog
>
> 2010-06-15 Fabien Chêne <fabien@gcc.gnu.org>
>
> PR c++/26256
> * search.c (disambiguate_with_using_decl): Define. Try to
> disambiguate a field type or a field decl with using declarations.
> (lookup_field_r): Call disambiguate_with_using_decl when an
> ambiguity has been encountered.
> * class.c (count_fields): Ignore using declarations.
> (add_fields_to_record_type): Likewise.
> (check_field_decls): Keep using declarations.
>
>
> --
> Fabien
>
--
Fabien
next prev parent reply other threads:[~2010-06-17 7:39 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 [this message]
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
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=AANLkTimUf5BJM3CAOhtfwDAgsRn_hk7N6PgV5XmZtEU2@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).