+1998-05-26 Mark Mitchell <mark@markmitchell.com>
+
+ * decl.c (pushtag): Avoid crashing on erroneous input.
+
1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* decl.c (push_namespace): Only produce one unique name for
TYPE_NAME (type) = d;
DECL_CONTEXT (d) = context;
- if (IS_AGGR_TYPE (type)
+ if (processing_template_parmlist)
+ /* You can't declare a new template type in a template
+ parameter list. But, you can declare a non-template
+ type:
+
+ template <class A*> struct S;
+
+ is a forward-declaration of `A'. */
+ ;
+ else if (IS_AGGR_TYPE (type)
&& (/* If !GLOBALIZE then we are looking at a
definition. It may not be a primary template.
(For example, in:
friend class S2;
};
- declares S2 to be at global scope. We must be
- careful, however, of the following case:
-
- template <class A*> struct S;
-
- which declares a non-template class `A'. */
- || (!processing_template_parmlist
- && (processing_template_decl >
- template_class_depth (current_class_type)))))
+ declares S2 to be at global scope. */
+ || (processing_template_decl >
+ template_class_depth (current_class_type))))
{
d = push_template_decl_real (d, globalize);
/* If the current binding level is the binding level for