mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-04 17:50:20 +08:00
decl.c (grokfndecl): Handle definition of specialization in friend declaration.
* decl.c (grokfndecl): Handle definition of specialization in friend declaration. * error.c (dump_decl): Fix LOOKUP_EXPR handling. From-SVN: r19919
This commit is contained in:
parent
35acd3f282
commit
f9d94ea4d4
@ -1,3 +1,10 @@
|
||||
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
|
||||
|
@ -7625,16 +7625,23 @@ grokfndecl (ctype, type, declarator, orig_declarator, virtualp, flags, quals,
|
||||
break;
|
||||
}
|
||||
|
||||
if (friendp &&
|
||||
TREE_CODE (orig_declarator) == TEMPLATE_ID_EXPR)
|
||||
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 (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. */
|
||||
|
@ -872,7 +872,7 @@ dump_decl (t, v)
|
||||
break;
|
||||
|
||||
case LOOKUP_EXPR:
|
||||
OB_PUTID (TREE_OPERAND (t, 0));
|
||||
dump_decl (TREE_OPERAND (t, 0), v);
|
||||
break;
|
||||
|
||||
case LABEL_DECL:
|
||||
|
Loading…
Reference in New Issue
Block a user