This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ Patch] for c++/52465


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]