]> gcc.gnu.org Git - gcc.git/commit
Fix PR c++/42225, take 2
authorDodji Seketeli <dodji@redhat.com>
Sat, 19 Dec 2009 22:40:37 +0000 (22:40 +0000)
committerDodji Seketeli <dodji@gcc.gnu.org>
Sat, 19 Dec 2009 22:40:37 +0000 (23:40 +0100)
commite96ce650a83492661331c551dc767179eab5f8b7
tree1dea0c05df1cc3687feff71c23514edde26e0836
parentb0ce048a3f7a78329145d0f48d63d3cabab8908b
Fix PR c++/42225, take 2

gcc/cp/ChangeLog:
PR c++/42225
* pt.c (push_template_decl_real): Set DECL_CONTEXT of template type
parms to their containing template decl.
* typeck.c (comp_template_parms_position): Split this from
structural_comptypes.
(incompatible_template_type_parms_p): Renamed
incompatible_dependent_typedefs_p into this. Change the function to
handle comparison between TEMPLATE_TYPE_PARMs only.
(structural_comptypes): Use comp_template_parms_position in
TEMPLATE_TEMPLATE_PARM and BOUND_TEMPLATE_TEMPLATE_PARM cases.
Use incompatible_template_type_parms_p in TEMPLATE_TYPE_PARM case.
* mangle.c (decl_mangling_context): Template type parms don't have
a mangling context.
* tree.c (cp_set_underlying_type): Set type structural equality
only for TEMPLATE_TYPE_PARMs.

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

From-SVN: r155363
gcc/cp/ChangeLog
gcc/cp/mangle.c
gcc/cp/pt.c
gcc/cp/tree.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/typedef26.C [new file with mode: 0644]
This page took 0.069767 seconds and 5 git commands to generate.