+Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
+
+ * pt.c (instantiate_class_template): Don't do injection when
+ processing_template_decl is true, as pollutes current_binding_level
+ for base classes.
+
Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
* pt.c (maybe_fold_nontype_arg): Add prototype.
for (; d; d = TREE_CHAIN (d))
TREE_VALUE (d) = xref_tag_from_type (TREE_VALUE (d), NULL_TREE, 1);
- d = tsubst (DECL_TEMPLATE_INJECT (template), args,
+ /* This does injection for friend functions. */
+ if (!processing_template_decl)
+ {
+ d = tsubst (DECL_TEMPLATE_INJECT (template), args,
TREE_VEC_LENGTH (args), NULL_TREE);
- for (; d; d = TREE_CHAIN (d))
- {
- tree t = TREE_VALUE (d);
+ for (; d; d = TREE_CHAIN (d))
+ {
+ tree t = TREE_VALUE (d);
- if (TREE_CODE (t) == TYPE_DECL)
- /* Already injected. */;
- else
- pushdecl (t);
- }
+ if (TREE_CODE (t) == TYPE_DECL)
+ /* Already injected. */;
+ else
+ pushdecl (t);
+ }
+ }
}
if (! uses_template_parms (type))