OSDN Git Service

Fix PR c++/43558
authordodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 31 Mar 2010 09:21:02 +0000 (09:21 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 00:40:21 +0000 (09:40 +0900)
commit7ea8c813b0ec32d933f23dcd97eae34c7ded9c71
tree15918f79290553f47735f430e9164a04265e7bc0
parent172406b070bc5bfb927a392f3ff3764866ebfb8b
Fix PR c++/43558

gcc/cp/ChangeLog:
PR c++/43558
* cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
* pt.c (end_template_parm_list): Store sibling template parms of
each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
(push_template_decl_real): Don't store the containing template decl
into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
* typeck.c (get_template_parms_of_dependent_type): Get sibling parms
of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
Simplify the logic.

gcc/testsuite/ChangeLog:
PR c++/43558
* g++.dg/template/typedef31.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157857 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/pt.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog