This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ Patch] for c++/52465
- From: Fabien Chêne <fabien dot chene at gmail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Dodji Seketeli <dodji at seketeli dot org>
- Cc: Jason Merrill <jason at redhat dot com>
- Date: Sat, 7 Apr 2012 17:38:42 +0200
- Subject: Re: [C++ Patch] for c++/52465
- References: <CAFH4-dgxXPKEZmMvw98bZ-kF5L--oBx9jyscX8t2sUWOJxK=PQ@mail.gmail.com> <m34ntuyp19.fsf@seketeli.org> <CAFH4-dg88HWgcjVci+8GUYpmC4+2P3oyt4A5oWQeZ7R_SGX62w@mail.gmail.com>
2012/3/12 Fabien Chêne <fabien.chene@gmail.com>:
> Salut Dodji,
>
> 2012/3/12 Dodji Seketeli <dodji@seketeli.org>:
> [...]
>>> Index: gcc/cp/decl.c
>>> ===================================================================
>>> --- gcc/cp/decl.c ? ? (revision 184891)
>>> +++ gcc/cp/decl.c ? ? (working copy)
>>> @@ -8686,6 +8686,9 @@ grokdeclarator (const cp_declarator *dec
>>> ? ? ? ?type = NULL_TREE;
>>> ? ? ? ?type_was_error_mark_node = true;
>>> ? ? ?}
>>> +
>>> + ?type = strip_using_decl (type);
>>> +
>>
>> I am a little bit curious as to why this change is necessary. ?It seems
>> to me that the test case of your patch would pass even without this
>> change, wouldn't it?
>
> Yes, this testcase would pass, but an existing testcase wouldn't. I
> don't remeber which one, but I think it was related to using
> declarations that refer to a typedef.
>
> struct A { typedef int T; };
> stuct B : A { using B::T; };
More precisely, the testcase which was failing is g++.other/using5.C.
--
Fabien