extern void mark_decl_instantiated PARAMS ((tree, int));
extern int more_specialized PARAMS ((tree, tree, int, int));
extern void mark_class_instantiated PARAMS ((tree, int));
-extern void do_decl_instantiation PARAMS ((tree, tree, tree));
+extern void do_decl_instantiation (tree, tree);
extern void do_type_instantiation PARAMS ((tree, tree, tsubst_flags_t));
extern tree instantiate_decl PARAMS ((tree, int));
extern tree get_bindings PARAMS ((tree, tree, tree));
#include "input.h"
#include "flags.h"
#include "cp-tree.h"
+#include "decl.h"
#include "lex.h"
#include "c-pragma.h" /* For YYDEBUG definition. */
#include "output.h"
static tree parse_scoped_id PARAMS ((tree));
static tree parse_xref_tag (tree, tree, int);
static tree parse_handle_class_head (tree, tree, tree, int, int *);
+static void parse_decl_instantiation (tree, tree, tree);
/* Cons up an empty parameter list. */
static inline tree
end_explicit_instantiation
| TEMPLATE begin_explicit_instantiation typed_declspecs declarator
{ tree specs = strip_attrs ($3.t);
- do_decl_instantiation (specs, $4, NULL_TREE); }
+ parse_decl_instantiation (specs, $4, NULL_TREE); }
end_explicit_instantiation
| TEMPLATE begin_explicit_instantiation notype_declarator
- { do_decl_instantiation (NULL_TREE, $3, NULL_TREE); }
+ { parse_decl_instantiation (NULL_TREE, $3, NULL_TREE); }
end_explicit_instantiation
| TEMPLATE begin_explicit_instantiation constructor_declarator
- { do_decl_instantiation (NULL_TREE, $3, NULL_TREE); }
+ { parse_decl_instantiation (NULL_TREE, $3, NULL_TREE); }
end_explicit_instantiation
| SCSPEC TEMPLATE begin_explicit_instantiation typespec ';'
{ do_type_instantiation ($4.t, $1, 1);
| SCSPEC TEMPLATE begin_explicit_instantiation typed_declspecs
declarator
{ tree specs = strip_attrs ($4.t);
- do_decl_instantiation (specs, $5, $1); }
+ parse_decl_instantiation (specs, $5, $1); }
end_explicit_instantiation
{}
| SCSPEC TEMPLATE begin_explicit_instantiation notype_declarator
- { do_decl_instantiation (NULL_TREE, $4, $1); }
+ { parse_decl_instantiation (NULL_TREE, $4, $1); }
end_explicit_instantiation
{}
| SCSPEC TEMPLATE begin_explicit_instantiation constructor_declarator
- { do_decl_instantiation (NULL_TREE, $4, $1); }
+ { parse_decl_instantiation (NULL_TREE, $4, $1); }
end_explicit_instantiation
{}
;
return xref_tag (tag_kind, name, attributes, globalize);
}
-/* Like handle_class_head, but AGGR may be as for parse_xref_tag. */
+/* Like handle_class_head, but AGGR may be as for parse_xref_tag. */
static tree
parse_handle_class_head (tree aggr, tree scope, tree id,
defn_p, new_type_p);
}
+/* Like do_decl_instantiation, but the declarator has not yet been
+ parsed. */
+
+static void
+parse_decl_instantiation (tree declspecs, tree declarator, tree storage)
+{
+ tree decl = grokdeclarator (declarator, declspecs, NORMAL, 0, NULL);
+ do_decl_instantiation (decl, storage);
+}
+
#include "gt-cp-parse.h"