cxx-pretty-print.c (pp_cxx_unqualified_id): Use TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.

* cxx-pretty-print.c (pp_cxx_unqualified_id): Use
	TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
	* search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
	the field is named TEMPLATE_TYPE_PARM_INDEX.

From-SVN: r79683
This commit is contained in:
Richard Kenner 2004-03-19 14:18:27 +00:00 committed by Richard Kenner
parent 0c6196661d
commit 32f4f7197f
3 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* cxx-pretty-print.c (pp_cxx_unqualified_id): Use
TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
* search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
the field is named TEMPLATE_TYPE_PARM_INDEX.
2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14545

View File

@ -184,7 +184,7 @@ pp_cxx_unqualified_id (cxx_pretty_printer *pp, tree t)
break;
case TEMPLATE_TYPE_PARM:
t = TYPE_FIELDS (t);
t = TEMPLATE_TYPE_PARM_INDEX (t);
case TEMPLATE_PARM_INDEX:
pp_cxx_unqualified_id (pp, TEMPLATE_PARM_DECL (t));
break;

View File

@ -2258,7 +2258,9 @@ dfs_unuse_fields (tree binfo, void *data ATTRIBUTE_UNUSED)
fields = TYPENAME_TYPE_FULLNAME (type);
else if (TREE_CODE (type) == TYPEOF_TYPE)
fields = TYPEOF_TYPE_EXPR (type);
else if (TREE_CODE (type) == TEMPLATE_TYPE_PARM)
else if (TREE_CODE (type) == TEMPLATE_TYPE_PARM
|| TREE_CODE (type) == TEMPLATE_TEMPLATE_PARM
|| TREE_CODE (type) == BOUND_TEMPLATE_TEMPLATE_PARM)
fields = TEMPLATE_TYPE_PARM_INDEX (type);
else
fields = TYPE_FIELDS (type);