Commit 744fac59 by Kriang Lerdsuwanakij Committed by Jason Merrill

typeck.c (comptypes, [...]): Add parameter comparison.

	* typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
	comparison.
	* pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
	template template parameter, record its use.
	(for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
	its template arguments if exists.
	* pt.c (coerce_template_template_parms): New function equivalent
	to coerce_template_parms when IS_TMPL_PARM is true.
	(coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
	all callers changed.
	(coerce_template_parms): Access ARGLIST properly when creating a
	new vector.  Only accept implicit TYPE_DECL as valid argument for
	a template template parameter when it is a base class of
	current_class_type.  Don't display error message when COMPLAIN is
	false.

From-SVN: r21073
parent eda600e8
1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
* typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
comparison.
* pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
template template parameter, record its use.
(for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
its template arguments if exists.
* pt.c (coerce_template_template_parms): New function equivalent
to coerce_template_parms when IS_TMPL_PARM is true.
(coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
all callers changed.
(coerce_template_parms): Access ARGLIST properly when creating a
new vector. Only accept implicit TYPE_DECL as valid argument for
a template template parameter when it is a base class of
current_class_type. Don't display error message when COMPLAIN is
false.
1998-07-12 Klaus Kaempf (kkaempf@progis.de) 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
* repo.c (get_base_filename): Use file_name_nondirectory (). * repo.c (get_base_filename): Use file_name_nondirectory.
(open_repo_file): Ditto. (open_repo_file): Ditto.
* cp-tree.h (file_name_nondirectory): Add prototype. * cp-tree.h (file_name_nondirectory): Add prototype.
......
...@@ -298,7 +298,7 @@ dicat (lo, hi) ...@@ -298,7 +298,7 @@ dicat (lo, hi)
OB_PUTC ('0' + ulo); OB_PUTC ('0' + ulo);
} }
__inline void static __inline void
flush_repeats (nrepeats, type) flush_repeats (nrepeats, type)
int nrepeats; int nrepeats;
tree type; tree type;
......
...@@ -804,6 +804,9 @@ comptypes (type1, type2, strict) ...@@ -804,6 +804,9 @@ comptypes (type1, type2, strict)
if (TEMPLATE_TYPE_IDX (t1) != TEMPLATE_TYPE_IDX (t2) if (TEMPLATE_TYPE_IDX (t1) != TEMPLATE_TYPE_IDX (t2)
|| TEMPLATE_TYPE_LEVEL (t1) != TEMPLATE_TYPE_LEVEL (t2)) || TEMPLATE_TYPE_LEVEL (t1) != TEMPLATE_TYPE_LEVEL (t2))
return 0; return 0;
if (! comp_template_parms (DECL_TEMPLATE_PARMS (TYPE_NAME (t1)),
DECL_TEMPLATE_PARMS (TYPE_NAME (t2))))
return 0;
if (! CLASSTYPE_TEMPLATE_INFO (t1) && ! CLASSTYPE_TEMPLATE_INFO (t2)) if (! CLASSTYPE_TEMPLATE_INFO (t1) && ! CLASSTYPE_TEMPLATE_INFO (t2))
return 1; return 1;
/* Don't check inheritance. */ /* Don't check inheritance. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment