+1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
+
+ * decl.c (grokfndecl): Handle definition of specialization in
+ friend declaration.
+
+ * error.c (dump_decl): Fix LOOKUP_EXPR handling.
+
1998-05-20 Mark Mitchell <mmitchell@usa.net>
* class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
break;
}
- if (friendp &&
- TREE_CODE (orig_declarator) == TEMPLATE_ID_EXPR)
- {
- /* A friend declaration of the form friend void f<>(). Record
- the information in the TEMPLATE_ID_EXPR. */
- SET_DECL_IMPLICIT_INSTANTIATION (decl);
- DECL_TEMPLATE_INFO (decl)
- = perm_tree_cons (TREE_OPERAND (orig_declarator, 0),
- TREE_OPERAND (orig_declarator, 1),
- NULL_TREE);
+ if (friendp
+ && TREE_CODE (orig_declarator) == TEMPLATE_ID_EXPR)
+ {
+ if (funcdef_flag)
+ cp_error
+ ("defining explicit specialization `%D' in friend declaration",
+ orig_declarator);
+ else
+ {
+ /* A friend declaration of the form friend void f<>(). Record
+ the information in the TEMPLATE_ID_EXPR. */
+ SET_DECL_IMPLICIT_INSTANTIATION (decl);
+ DECL_TEMPLATE_INFO (decl)
+ = perm_tree_cons (TREE_OPERAND (orig_declarator, 0),
+ TREE_OPERAND (orig_declarator, 1),
+ NULL_TREE);
+ }
}
/* Caller will do the rest of this. */
break;
case LOOKUP_EXPR:
- OB_PUTID (TREE_OPERAND (t, 0));
+ dump_decl (TREE_OPERAND (t, 0), v);
break;
case LABEL_DECL: