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)
committerdodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 31 Mar 2010 09:21:02 +0000 (09:21 +0000)
commita410c3fc37e4da2b208910507b7c47899166c635
tree9c61e3b92286af000161c01dd1cffdf7c1439882
parentdc2059b58042bd5a546c0749c0747f7a9f11bbda
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
gcc/testsuite/g++.dg/template/typedef31.C [new file with mode: 0644]