/* The type of functions taking a tree, and some additional data, and
returning an int. */
-typedef int (*tree_fn_t) PARAMS ((tree, void*));
+typedef int (*tree_fn_t) (tree, void*);
/* The PENDING_TEMPLATES is a TREE_LIST of templates whose
instantiations have been deferred, either because their definitions
#define GTB_IGNORE_TYPE 2 /* We don't need to try to unify the current
type with the desired type. */
-static void push_access_scope_real PARAMS ((tree, tree, tree));
-static void push_access_scope PARAMS ((tree));
-static void pop_access_scope PARAMS ((tree));
-static int resolve_overloaded_unification PARAMS ((tree, tree, tree, tree,
- unification_kind_t, int));
-static int try_one_overload PARAMS ((tree, tree, tree, tree, tree,
- unification_kind_t, int));
-static int unify PARAMS ((tree, tree, tree, tree, int));
-static void add_pending_template PARAMS ((tree));
-static void reopen_tinst_level PARAMS ((tree));
-static tree classtype_mangled_name PARAMS ((tree));
-static char *mangle_class_name_for_template PARAMS ((const char *,
- tree, tree));
-static tree tsubst_initializer_list PARAMS ((tree, tree));
-static int list_eq PARAMS ((tree, tree));
-static tree get_class_bindings PARAMS ((tree, tree, tree));
-static tree coerce_template_parms PARAMS ((tree, tree, tree,
- tsubst_flags_t, int));
-static void tsubst_enum PARAMS ((tree, tree, tree));
-static tree add_to_template_args PARAMS ((tree, tree));
-static tree add_outermost_template_args PARAMS ((tree, tree));
-static bool check_instantiated_args PARAMS ((tree, tree, tsubst_flags_t));
-static int maybe_adjust_types_for_deduction PARAMS ((unification_kind_t, tree*,
- tree*));
-static int type_unification_real PARAMS ((tree, tree, tree, tree,
- int, unification_kind_t, int, int));
-static void note_template_header PARAMS ((int));
-static tree maybe_fold_nontype_arg PARAMS ((tree));
-static void maybe_fold_nontype_args PARAMS ((tree));
-static tree convert_nontype_argument PARAMS ((tree, tree));
-static tree convert_template_argument PARAMS ((tree, tree, tree,
- tsubst_flags_t, int, tree));
-static tree get_bindings_overload PARAMS ((tree, tree, tree));
-static int for_each_template_parm PARAMS ((tree, tree_fn_t, void*, htab_t));
-static tree build_template_parm_index PARAMS ((int, int, int, tree, tree));
-static int inline_needs_template_parms PARAMS ((tree));
-static void push_inline_template_parms_recursive PARAMS ((tree, int));
-static tree retrieve_specialization PARAMS ((tree, tree));
-static tree retrieve_local_specialization PARAMS ((tree));
-static tree register_specialization PARAMS ((tree, tree, tree));
-static void register_local_specialization PARAMS ((tree, tree));
-static int unregister_specialization PARAMS ((tree, tree));
-static tree reduce_template_parm_level PARAMS ((tree, tree, int));
-static tree build_template_decl PARAMS ((tree, tree));
-static int mark_template_parm PARAMS ((tree, void *));
-static int template_parm_this_level_p PARAMS ((tree, void *));
-static tree tsubst_friend_function PARAMS ((tree, tree));
-static tree tsubst_friend_class PARAMS ((tree, tree));
-static int can_complete_type_without_circularity PARAMS ((tree));
-static tree get_bindings_real PARAMS ((tree, tree, tree, int, int, int));
-static int template_decl_level PARAMS ((tree));
-static int check_cv_quals_for_unify PARAMS ((int, tree, tree));
-static tree tsubst_template_arg_vector PARAMS ((tree, tree, tsubst_flags_t));
-static tree tsubst_template_parms PARAMS ((tree, tree, tsubst_flags_t));
-static void regenerate_decl_from_template PARAMS ((tree, tree));
-static tree most_specialized PARAMS ((tree, tree, tree));
-static tree most_specialized_class PARAMS ((tree, tree));
-static int template_class_depth_real PARAMS ((tree, int));
-static tree tsubst_aggr_type PARAMS ((tree, tree, tsubst_flags_t, tree, int));
-static tree tsubst_decl PARAMS ((tree, tree, tree, tsubst_flags_t));
-static tree tsubst_arg_types PARAMS ((tree, tree, tsubst_flags_t, tree));
-static tree tsubst_function_type PARAMS ((tree, tree, tsubst_flags_t, tree));
-static void check_specialization_scope PARAMS ((void));
-static tree process_partial_specialization PARAMS ((tree));
-static void set_current_access_from_decl PARAMS ((tree));
-static void check_default_tmpl_args PARAMS ((tree, tree, int, int));
-static tree tsubst_call_declarator_parms PARAMS ((tree, tree,
- tsubst_flags_t, tree));
-static tree get_template_base_recursive PARAMS ((tree, tree,
- tree, tree, tree, int));
-static tree get_template_base PARAMS ((tree, tree, tree, tree));
-static int verify_class_unification PARAMS ((tree, tree, tree));
-static tree try_class_unification PARAMS ((tree, tree, tree, tree));
-static int coerce_template_template_parms PARAMS ((tree, tree, tsubst_flags_t,
- tree, tree));
-static tree determine_specialization PARAMS ((tree, tree, tree *, int));
-static int template_args_equal PARAMS ((tree, tree));
-static void tsubst_default_arguments PARAMS ((tree));
-static tree for_each_template_parm_r PARAMS ((tree *, int *, void *));
-static tree copy_default_args_to_explicit_spec_1 PARAMS ((tree, tree));
-static void copy_default_args_to_explicit_spec PARAMS ((tree));
-static int invalid_nontype_parm_type_p PARAMS ((tree, tsubst_flags_t));
+static void push_access_scope_real (tree, tree, tree);
+static void push_access_scope (tree);
+static void pop_access_scope (tree);
+static int resolve_overloaded_unification (tree, tree, tree, tree,
+ unification_kind_t, int);
+static int try_one_overload (tree, tree, tree, tree, tree,
+ unification_kind_t, int);
+static int unify (tree, tree, tree, tree, int);
+static void add_pending_template (tree);
+static void reopen_tinst_level (tree);
+static tree classtype_mangled_name (tree);
+static char* mangle_class_name_for_template (const char *, tree, tree);
+static tree tsubst_initializer_list (tree, tree);
+static int list_eq (tree, tree);
+static tree get_class_bindings (tree, tree, tree);
+static tree coerce_template_parms (tree, tree, tree, tsubst_flags_t, int);
+static void tsubst_enum (tree, tree, tree);
+static tree add_to_template_args (tree, tree);
+static tree add_outermost_template_args (tree, tree);
+static bool check_instantiated_args (tree, tree, tsubst_flags_t);
+static int maybe_adjust_types_for_deduction (unification_kind_t, tree*, tree*);
+static int type_unification_real (tree, tree, tree, tree,
+ int, unification_kind_t, int, int);
+static void note_template_header (int);
+static tree maybe_fold_nontype_arg (tree);
+static void maybe_fold_nontype_args (tree);
+static tree convert_nontype_argument (tree, tree);
+static tree convert_template_argument (tree, tree, tree,
+ tsubst_flags_t, int, tree);
+static tree get_bindings_overload (tree, tree, tree);
+static int for_each_template_parm (tree, tree_fn_t, void*, htab_t);
+static tree build_template_parm_index (int, int, int, tree, tree);
+static int inline_needs_template_parms (tree);
+static void push_inline_template_parms_recursive (tree, int);
+static tree retrieve_specialization (tree, tree);
+static tree retrieve_local_specialization (tree);
+static tree register_specialization (tree, tree, tree);
+static void register_local_specialization (tree, tree);
+static int unregister_specialization (tree, tree);
+static tree reduce_template_parm_level (tree, tree, int);
+static tree build_template_decl (tree, tree);
+static int mark_template_parm (tree, void *);
+static int template_parm_this_level_p (tree, void *);
+static tree tsubst_friend_function (tree, tree);
+static tree tsubst_friend_class (tree, tree);
+static int can_complete_type_without_circularity (tree);
+static tree get_bindings_real (tree, tree, tree, int, int, int);
+static int template_decl_level (tree);
+static int check_cv_quals_for_unify (int, tree, tree);
+static tree tsubst_template_arg_vector (tree, tree, tsubst_flags_t);
+static tree tsubst_template_parms (tree, tree, tsubst_flags_t);
+static void regenerate_decl_from_template (tree, tree);
+static tree most_specialized (tree, tree, tree);
+static tree most_specialized_class (tree, tree);
+static int template_class_depth_real (tree, int);
+static tree tsubst_aggr_type (tree, tree, tsubst_flags_t, tree, int);
+static tree tsubst_decl (tree, tree, tree, tsubst_flags_t);
+static tree tsubst_arg_types (tree, tree, tsubst_flags_t, tree);
+static tree tsubst_function_type (tree, tree, tsubst_flags_t, tree);
+static void check_specialization_scope (void);
+static tree process_partial_specialization (tree);
+static void set_current_access_from_decl (tree);
+static void check_default_tmpl_args (tree, tree, int, int);
+static tree tsubst_call_declarator_parms (tree, tree, tsubst_flags_t, tree);
+static tree get_template_base_recursive (tree, tree, tree, tree, tree, int);
+static tree get_template_base (tree, tree, tree, tree);
+static int verify_class_unification (tree, tree, tree);
+static tree try_class_unification (tree, tree, tree, tree);
+static int coerce_template_template_parms (tree, tree, tsubst_flags_t,
+ tree, tree);
+static tree determine_specialization (tree, tree, tree *, int);
+static int template_args_equal (tree, tree);
+static void tsubst_default_arguments (tree);
+static tree for_each_template_parm_r (tree *, int *, void *);
+static tree copy_default_args_to_explicit_spec_1 (tree, tree);
+static void copy_default_args_to_explicit_spec (tree);
+static int invalid_nontype_parm_type_p (tree, tsubst_flags_t);
static int eq_local_specializations (const void *, const void *);
static bool dependent_type_p_r (tree);
static bool dependent_template_id_p (tree, tree);
this is used instead of the context of T. */
void
-push_access_scope_real (t, args, context)
- tree t, args, context;
+push_access_scope_real (tree t, tree args, tree context)
{
if (TREE_CODE (t) == FUNCTION_DECL || DECL_FUNCTION_TEMPLATE_P (t))
{
/* Like push_access_scope_real, but always uses DECL_CONTEXT. */
void
-push_access_scope (t)
- tree t;
+push_access_scope (tree t)
{
push_access_scope_real (t, NULL_TREE, NULL_TREE);
}
are processing. */
void
-pop_access_scope (t)
- tree t;
+pop_access_scope (tree t)
{
if (TREE_CODE (t) == FUNCTION_DECL || DECL_FUNCTION_TEMPLATE_P (t))
{
itself is returned. */
tree
-finish_member_template_decl (decl)
- tree decl;
+finish_member_template_decl (tree decl)
{
if (decl == error_mark_node)
return error_mark_node;
always safe. */
static int
-template_class_depth_real (type, count_specializations)
- tree type;
- int count_specializations;
+template_class_depth_real (tree type, int count_specializations)
{
int depth;
the depth. */
int
-template_class_depth (type)
- tree type;
+template_class_depth (tree type)
{
return template_class_depth_real (type, /*count_specializations=*/0);
}
needs us to push template parms. */
static int
-inline_needs_template_parms (decl)
- tree decl;
+inline_needs_template_parms (tree decl)
{
if (! DECL_TEMPLATE_INFO (decl))
return 0;
innermost first. */
static void
-push_inline_template_parms_recursive (parmlist, levels)
- tree parmlist;
- int levels;
+push_inline_template_parms_recursive (tree parmlist, int levels)
{
tree parms = TREE_VALUE (parmlist);
int i;
a friend template defined in a class definition. */
void
-maybe_begin_member_template_processing (decl)
- tree decl;
+maybe_begin_member_template_processing (tree decl)
{
tree parms;
int levels = 0;
/* Undo the effects of begin_member_template_processing. */
void
-maybe_end_member_template_processing ()
+maybe_end_member_template_processing (void)
{
int i;
C<int>::f(U)' is considered a member template. */
int
-is_member_template (t)
- tree t;
+is_member_template (tree t)
{
if (!DECL_FUNCTION_TEMPLATE_P (t))
/* Anything that isn't a function or a template function is
a member template. */
int
-is_member_template_class (t)
- tree t;
+is_member_template_class (tree t)
{
if (!DECL_CLASS_TEMPLATE_P (t))
/* Anything that isn't a class template, is certainly not a member
but has as its innermost set of arguments the EXTRA_ARGS. */
static tree
-add_to_template_args (args, extra_args)
- tree args;
- tree extra_args;
+add_to_template_args (tree args, tree extra_args)
{
tree new_args;
int extra_depth;
partial instantiation. */
static tree
-add_outermost_template_args (args, extra_args)
- tree args;
- tree extra_args;
+add_outermost_template_args (tree args, tree extra_args)
{
tree new_args;
/* Return the N levels of innermost template arguments from the ARGS. */
tree
-get_innermost_template_args (args, n)
- tree args;
- int n;
+get_innermost_template_args (tree args, int n)
{
tree new_args;
int extra_levels;
the parms. */
void
-begin_template_parm_list ()
+begin_template_parm_list (void)
{
/* We use a non-tag-transparent scope here, which causes pushtag to
put tags in this scope, rather than in the enclosing class or
invalid to declare a specialization here, an error is reported. */
static void
-check_specialization_scope ()
+check_specialization_scope (void)
{
tree scope = current_scope ();
/* We've just seen template <>. */
void
-begin_specialization ()
+begin_specialization (void)
{
begin_scope (sk_template_spec);
note_template_header (1);
template<>. */
void
-end_specialization ()
+end_specialization (void)
{
finish_scope ();
reset_specialization ();
function specialization. */
void
-reset_specialization ()
+reset_specialization (void)
{
processing_specialization = 0;
template_header_count = 0;
it was of the form template <>. */
static void
-note_template_header (specialization)
- int specialization;
+note_template_header (int specialization)
{
processing_specialization = specialization;
template_header_count++;
/* We're beginning an explicit instantiation. */
void
-begin_explicit_instantiation ()
+begin_explicit_instantiation (void)
{
my_friendly_assert (!processing_explicit_instantiation, 20020913);
processing_explicit_instantiation = true;
void
-end_explicit_instantiation ()
+end_explicit_instantiation (void)
{
my_friendly_assert(processing_explicit_instantiation, 20020913);
processing_explicit_instantiation = false;
is a partial specialization. Do appropriate error-checking. */
void
-maybe_process_partial_specialization (type)
- tree type;
+maybe_process_partial_specialization (tree type)
{
/* TYPE maybe an ERROR_MARK_NODE. */
tree context = TYPE_P (type) ? TYPE_CONTEXT (type) : NULL_TREE;
templates with more than one level of parameters. */
static tree
-retrieve_specialization (tmpl, args)
- tree tmpl;
- tree args;
+retrieve_specialization (tree tmpl, tree args)
{
tree s;
/* Like retrieve_specialization, but for local declarations. */
static tree
-retrieve_local_specialization (tmpl)
- tree tmpl;
+retrieve_local_specialization (tree tmpl)
{
tree spec =
(tree) htab_find_with_hash (local_specializations, tmpl,
/* Returns nonzero iff DECL is a specialization of TMPL. */
int
-is_specialization_of (decl, tmpl)
- tree decl;
- tree tmpl;
+is_specialization_of (tree decl, tree tmpl)
{
tree t;
declaration, if available. */
static tree
-register_specialization (spec, tmpl, args)
- tree spec;
- tree tmpl;
- tree args;
+register_specialization (tree spec, tree tmpl, tree args)
{
tree s;
TMPL. */
static int
-unregister_specialization (spec, tmpl)
- tree spec;
- tree tmpl;
+unregister_specialization (tree spec, tree tmpl)
{
tree* s;
registering SPEC, an instantiation of TMPL. */
static void
-register_local_specialization (spec, tmpl)
- tree spec;
- tree tmpl;
+register_local_specialization (tree spec, tree tmpl)
{
void **slot;
/* Print the list of candidate FNS in an error message. */
void
-print_candidates (fns)
- tree fns;
+print_candidates (tree fns)
{
tree fn;
issued. The error_mark_node is returned to indicate failure. */
static tree
-determine_specialization (template_id, decl, targs_out,
- need_member_template)
- tree template_id;
- tree decl;
- tree* targs_out;
- int need_member_template;
+determine_specialization (tree template_id,
+ tree decl,
+ tree* targs_out,
+ int need_member_template)
{
tree fns;
tree targs;
TMPL_TYPES. */
static tree
-copy_default_args_to_explicit_spec_1 (spec_types,
- tmpl_types)
- tree spec_types;
- tree tmpl_types;
+copy_default_args_to_explicit_spec_1 (tree spec_types,
+ tree tmpl_types)
{
tree new_spec_types;
is consistent with how implicit instantiations are handled. */
static void
-copy_default_args_to_explicit_spec (decl)
- tree decl;
+copy_default_args_to_explicit_spec (tree decl)
{
tree tmpl;
tree spec_types;
for that template. */
tree
-check_explicit_specialization (declarator, decl, template_count, flags)
- tree declarator;
- tree decl;
- int template_count;
- int flags;
+check_explicit_specialization (tree declarator,
+ tree decl,
+ int template_count,
+ int flags)
{
int have_def = flags & 2;
int is_friend = flags & 4;
and such is reasonable. Issue error messages if not. */
void
-maybe_check_template_type (type)
- tree type;
+maybe_check_template_type (tree type)
{
if (template_header_count)
{
parameters. These are represented in the same format used for
DECL_TEMPLATE_PARMS. */
-int comp_template_parms (parms1, parms2)
- tree parms1;
- tree parms2;
+int comp_template_parms (tree parms1, tree parms2)
{
tree p1;
tree p2;
scope (including nested scopes). */
void
-check_template_shadow (decl)
- tree decl;
+check_template_shadow (tree decl)
{
tree olddecl;
ORIG_LEVEL, DECL, and TYPE. */
static tree
-build_template_parm_index (index, level, orig_level, decl, type)
- int index;
- int level;
- int orig_level;
- tree decl;
- tree type;
+build_template_parm_index (int index,
+ int level,
+ int orig_level,
+ tree decl,
+ tree type)
{
tree t = make_node (TEMPLATE_PARM_INDEX);
TEMPLATE_PARM_IDX (t) = index;
new one is created. */
static tree
-reduce_template_parm_level (index, type, levels)
- tree index;
- tree type;
- int levels;
+reduce_template_parm_level (tree index, tree type, int levels)
{
if (TEMPLATE_PARM_DESCENDANTS (index) == NULL_TREE
|| (TEMPLATE_PARM_LEVEL (TEMPLATE_PARM_DESCENDANTS (index))
LIST being built. */
tree
-process_template_parm (list, next)
- tree list, next;
+process_template_parm (tree list, tree next)
{
tree parm;
tree decl = 0;
as PARM_DECLs. */
tree
-end_template_parm_list (parms)
- tree parms;
+end_template_parm_list (tree parms)
{
int nparms;
tree parm, next;
/* end_template_decl is called after a template declaration is seen. */
void
-end_template_decl ()
+end_template_decl (void)
{
reset_specialization ();
The innermost PARMS are given first. */
tree
-current_template_args ()
+current_template_args (void)
{
tree header;
tree args = NULL_TREE;
template PARMS. Used by push_template_decl below. */
static tree
-build_template_decl (decl, parms)
- tree decl;
- tree parms;
+build_template_decl (tree decl, tree parms)
{
tree tmpl = build_lang_decl (TEMPLATE_DECL, DECL_NAME (decl), NULL_TREE);
DECL_TEMPLATE_PARMS (tmpl) = parms;
appropriately. */
static int
-mark_template_parm (t, data)
- tree t;
- void* data;
+mark_template_parm (tree t, void* data)
{
int level;
int idx;
/* Process the partial specialization DECL. */
static tree
-process_partial_specialization (decl)
- tree decl;
+process_partial_specialization (tree decl)
{
tree type = TREE_TYPE (decl);
tree maintmpl = CLASSTYPE_TI_TEMPLATE (type);
IS_PARTIAL is nonzero if DECL is a partial specialization. */
static void
-check_default_tmpl_args (decl, parms, is_primary, is_partial)
- tree decl;
- tree parms;
- int is_primary;
- int is_partial;
+check_default_tmpl_args (tree decl, tree parms, int is_primary, int is_partial)
{
const char *msg;
int last_level_to_check;
parameter of that level, return nonzero. */
static int
-template_parm_this_level_p (t, data)
- tree t;
- void *data;
+template_parm_this_level_p (tree t, void* data)
{
int this_level = *(int *)data;
int level;
If IS_FRIEND is nonzero, DECL is a friend declaration. */
tree
-push_template_decl_real (decl, is_friend)
- tree decl;
- int is_friend;
+push_template_decl_real (tree decl, int is_friend)
{
tree tmpl;
tree args;
}
tree
-push_template_decl (decl)
- tree decl;
+push_template_decl (tree decl)
{
return push_template_decl_real (decl, 0);
}
template <class T> struct S {}; */
void
-redeclare_class_template (type, parms)
- tree type;
- tree parms;
+redeclare_class_template (tree type, tree parms)
{
tree tmpl;
tree tmpl_parms;
parameters. */
static tree
-convert_nontype_argument (type, expr)
- tree type;
- tree expr;
+convert_nontype_argument (tree type, tree expr)
{
tree expr_type = TREE_TYPE (expr);
substitute the TT parameter. */
static int
-coerce_template_template_parms (parm_parms, arg_parms, complain,
- in_decl, outer_args)
- tree parm_parms, arg_parms;
- tsubst_flags_t complain;
- tree in_decl, outer_args;
+coerce_template_template_parms (tree parm_parms,
+ tree arg_parms,
+ tsubst_flags_t complain,
+ tree in_decl,
+ tree outer_args)
{
int nparms, nargs, i;
tree parm, arg;
the full set of template arguments deduced so far. */
static tree
-convert_template_argument (parm, arg, args, complain, i, in_decl)
- tree parm;
- tree arg;
- tree args;
- tsubst_flags_t complain;
- int i;
- tree in_decl;
+convert_template_argument (tree parm,
+ tree arg,
+ tree args,
+ tsubst_flags_t complain,
+ int i,
+ tree in_decl)
{
tree val;
tree inner_args;
deduction for any unspecified trailing arguments. */
static tree
-coerce_template_parms (parms, args, in_decl,
- complain,
- require_all_arguments)
- tree parms, args;
- tree in_decl;
- tsubst_flags_t complain;
- int require_all_arguments;
+coerce_template_parms (tree parms,
+ tree args,
+ tree in_decl,
+ tsubst_flags_t complain,
+ int require_all_arguments)
{
int nparms, nargs, i, lost = 0;
tree inner_args;
/* Returns 1 if template args OT and NT are equivalent. */
static int
-template_args_equal (ot, nt)
- tree ot, nt;
+template_args_equal (tree ot, tree nt)
{
if (nt == ot)
return 1;
of template arguments. Returns 0 otherwise. */
int
-comp_template_args (oldargs, newargs)
- tree oldargs, newargs;
+comp_template_args (tree oldargs, tree newargs)
{
int i;
for the instantiation. */
static char *
-mangle_class_name_for_template (name, parms, arglist)
- const char *name;
- tree parms, arglist;
+mangle_class_name_for_template (const char* name, tree parms, tree arglist)
{
static struct obstack scratch_obstack;
static char *scratch_firstobj;
}
static tree
-classtype_mangled_name (t)
- tree t;
+classtype_mangled_name (tree t)
{
if (CLASSTYPE_TEMPLATE_INFO (t)
/* Specializations have already had their names set up in
}
static void
-add_pending_template (d)
- tree d;
+add_pending_template (tree d)
{
tree ti = (TYPE_P (d)
? CLASSTYPE_TEMPLATE_INFO (d)
documentation for TEMPLATE_ID_EXPR. */
tree
-lookup_template_function (fns, arglist)
- tree fns, arglist;
+lookup_template_function (tree fns, tree arglist)
{
tree type;
DECL is returned. */
tree
-maybe_get_template_decl_from_type_decl (decl)
- tree decl;
+maybe_get_template_decl_from_type_decl (tree decl)
{
return (decl != NULL_TREE
&& TREE_CODE (decl) == TYPE_DECL
being instantiated. */
tree
-lookup_template_class (d1, arglist, in_decl, context, entering_scope, complain)
- tree d1, arglist;
- tree in_decl;
- tree context;
- int entering_scope;
- tsubst_flags_t complain;
+lookup_template_class (tree d1,
+ tree arglist,
+ tree in_decl,
+ tree context,
+ int entering_scope,
+ tsubst_flags_t complain)
{
tree template = NULL_TREE, parmlist;
tree t;
/* Called from for_each_template_parm via walk_tree. */
static tree
-for_each_template_parm_r (tp, walk_subtrees, d)
- tree *tp;
- int *walk_subtrees;
- void *d;
+for_each_template_parm_r (tree* tp, int* walk_subtrees, void* d)
{
tree t = *tp;
struct pair_fn_data *pfd = (struct pair_fn_data *) d;
considered to be the function which always returns 1. */
static int
-for_each_template_parm (t, fn, data, visited)
- tree t;
- tree_fn_t fn;
- void* data;
- htab_t visited;
+for_each_template_parm (tree t, tree_fn_t fn, void* data, htab_t visited)
{
struct pair_fn_data pfd;
int result;
}
int
-uses_template_parms (t)
- tree t;
+uses_template_parms (tree t)
{
return for_each_template_parm (t, 0, 0, NULL);
}
for diagnostics and to restore it later. */
int
-push_tinst_level (d)
- tree d;
+push_tinst_level (tree d)
{
tree new;
context. */
void
-pop_tinst_level ()
+pop_tinst_level (void)
{
tree old = current_tinst_level;
is one step out from LEVEL. */
static void
-reopen_tinst_level (level)
- tree level;
+reopen_tinst_level (tree level)
{
tree t;
-falt-external-templates. */
tree
-tinst_for_decl ()
+tinst_for_decl (void)
{
tree p = current_tinst_level;
Returns an appropriate tsubst'd friend declaration. */
static tree
-tsubst_friend_function (decl, args)
- tree decl;
- tree args;
+tsubst_friend_function (tree decl, tree args)
{
tree new_friend;
location_t saved_loc = input_location;
failure. */
static tree
-tsubst_friend_class (friend_tmpl, args)
- tree friend_tmpl;
- tree args;
+tsubst_friend_class (tree friend_tmpl, tree args)
{
tree friend_type;
tree tmpl;
Otherwise returns one. */
static int
-can_complete_type_without_circularity (type)
- tree type;
+can_complete_type_without_circularity (tree type)
{
if (type == NULL_TREE || type == error_mark_node)
return 0;
}
tree
-instantiate_class_template (type)
- tree type;
+instantiate_class_template (tree type)
{
tree template, args, pattern, t, member;
tree typedecl;
}
static int
-list_eq (t1, t2)
- tree t1, t2;
+list_eq (tree t1, tree t2)
{
if (t1 == NULL_TREE)
return t2 == NULL_TREE;
arguments, fold it like we weren't in the body of a template. */
static tree
-maybe_fold_nontype_arg (arg)
- tree arg;
+maybe_fold_nontype_arg (tree arg)
{
if (arg && !TYPE_P (arg) && !uses_template_parms (arg))
{
/* Substitute ARGS into the vector of template arguments T. */
static tree
-tsubst_template_arg_vector (t, args, complain)
- tree t;
- tree args;
- tsubst_flags_t complain;
+tsubst_template_arg_vector (tree t, tree args, tsubst_flags_t complain)
{
int len = TREE_VEC_LENGTH (t), need_new = 0, i;
tree *elts = (tree *) alloca (len * sizeof (tree));
result will be `template <int*, double, class V>'. */
static tree
-tsubst_template_parms (parms, args, complain)
- tree parms;
- tree args;
- tsubst_flags_t complain;
+tsubst_template_parms (tree parms, tree args, tsubst_flags_t complain)
{
tree r = NULL_TREE;
tree* new_parms;
we are presently tsubst'ing. Return the substituted value. */
static tree
-tsubst_aggr_type (t, args, complain, in_decl, entering_scope)
- tree t;
- tree args;
- tsubst_flags_t complain;
- tree in_decl;
- int entering_scope;
+tsubst_aggr_type (tree t,
+ tree args,
+ tsubst_flags_t complain,
+ tree in_decl,
+ int entering_scope)
{
if (t == NULL_TREE)
return NULL_TREE;
FN), which has the indicated TYPE. */
tree
-tsubst_default_argument (fn, type, arg)
- tree fn;
- tree type;
- tree arg;
+tsubst_default_argument (tree fn, tree type, tree arg)
{
/* This default argument came from a template. Instantiate the
default argument here, not in tsubst. In the case of
/* Substitute into all the default arguments for FN. */
static void
-tsubst_default_arguments (fn)
- tree fn;
+tsubst_default_arguments (tree fn)
{
tree arg;
tree tmpl_args;
and warning messages under control of COMPLAIN. */
static tree
-tsubst_decl (t, args, type, complain)
- tree t;
- tree args;
- tree type;
- tsubst_flags_t complain;
+tsubst_decl (tree t, tree args, tree type, tsubst_flags_t complain)
{
location_t saved_loc;
tree r = NULL_TREE;
/* Substitue into the ARG_TYPES of a function type. */
static tree
-tsubst_arg_types (arg_types, args, complain, in_decl)
- tree arg_types;
- tree args;
- tsubst_flags_t complain;
- tree in_decl;
+tsubst_arg_types (tree arg_types,
+ tree args,
+ tsubst_flags_t complain,
+ tree in_decl)
{
tree remaining_arg_types;
tree type;
results in an invalid type.] */
static tree
-tsubst_function_type (t, args, complain, in_decl)
- tree t;
- tree args;
- tsubst_flags_t complain;
- tree in_decl;
+tsubst_function_type (tree t,
+ tree args,
+ tsubst_flags_t complain,
+ tree in_decl)
{
tree return_type;
tree arg_types;
/* Substitute into the PARMS of a call-declarator. */
static tree
-tsubst_call_declarator_parms (parms, args, complain, in_decl)
- tree parms;
- tree args;
- tsubst_flags_t complain;
- tree in_decl;
+tsubst_call_declarator_parms (tree parms,
+ tree args,
+ tsubst_flags_t complain,
+ tree in_decl)
{
tree new_parms;
tree type;
for expressions, use tsubst_expr or tsubst_copy. */
static tree
-tsubst (t, args, complain, in_decl)
- tree t, args;
- tsubst_flags_t complain;
- tree in_decl;
+tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
{
tree type, r;
tsubst_expr. */
static tree
-tsubst_copy (t, args, complain, in_decl)
- tree t, args;
- tsubst_flags_t complain;
- tree in_decl;
+tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
{
enum tree_code code;
tree r;
processing. */
static tree
-tsubst_expr (t, args, complain, in_decl)
- tree t, args;
- tsubst_flags_t complain;
- tree in_decl;
+tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl)
{
tree stmt, tmp;
analysis. */
static tree
-tsubst_copy_and_build (t, args, complain, in_decl)
- tree t, args;
- tsubst_flags_t complain;
- tree in_decl;
+tsubst_copy_and_build (tree t,
+ tree args,
+ tsubst_flags_t complain,
+ tree in_decl)
{
if (t == NULL_TREE || t == error_mark_node)
return t;
Emit an error under control of COMPLAIN, and return TRUE on error. */
static bool
-check_instantiated_args (tmpl, args, complain)
- tree tmpl, args;
- tsubst_flags_t complain;
+check_instantiated_args (tree tmpl, tree args, tsubst_flags_t complain)
{
int ix, len = DECL_NTPARMS (tmpl);
bool result = false;
the template arguments in TARG_PTR. */
tree
-instantiate_template (tmpl, targ_ptr, complain)
- tree tmpl, targ_ptr;
- tsubst_flags_t complain;
+instantiate_template (tree tmpl, tree targ_ptr, tsubst_flags_t complain)
{
tree fndecl;
tree gen_tmpl;
partial ordering in [temp.func.order]/6). */
int
-fn_type_unification (fn, explicit_targs, targs, args, return_type,
- strict, len)
- tree fn, explicit_targs, targs, args, return_type;
- unification_kind_t strict;
- int len;
+fn_type_unification (tree fn,
+ tree explicit_targs,
+ tree targs,
+ tree args,
+ tree return_type,
+ unification_kind_t strict,
+ int len)
{
tree parms;
tree fntype;
initialized with the result of the conversion function. */
static int
-maybe_adjust_types_for_deduction (strict, parm, arg)
- unification_kind_t strict;
- tree* parm;
- tree* arg;
+maybe_adjust_types_for_deduction (unification_kind_t strict,
+ tree* parm,
+ tree* arg)
{
int result = 0;
template). */
static int
-type_unification_real (tparms, targs, xparms, xargs, subr,
- strict, allow_incomplete, xlen)
- tree tparms, targs, xparms, xargs;
- int subr;
- unification_kind_t strict;
- int allow_incomplete, xlen;
+type_unification_real (tree tparms,
+ tree targs,
+ tree xparms,
+ tree xargs,
+ int subr,
+ unification_kind_t strict,
+ int allow_incomplete,
+ int xlen)
{
tree parm, arg;
int i;
succeeds, we go with that. Modifies TARGS and returns 0 on success. */
static int
-resolve_overloaded_unification (tparms, targs, parm, arg, strict,
- sub_strict)
- tree tparms, targs, parm, arg;
- unification_kind_t strict;
- int sub_strict;
+resolve_overloaded_unification (tree tparms,
+ tree targs,
+ tree parm,
+ tree arg,
+ unification_kind_t strict,
+ int sub_strict)
{
tree tempargs = copy_node (targs);
int good = 0;
Returns 1 on success. */
static int
-try_one_overload (tparms, orig_targs, targs, parm, arg, strict,
- sub_strict)
- tree tparms, orig_targs, targs, parm, arg;
- unification_kind_t strict;
- int sub_strict;
+try_one_overload (tree tparms,
+ tree orig_targs,
+ tree targs,
+ tree parm,
+ tree arg,
+ unification_kind_t strict,
+ int sub_strict)
{
int nargs;
tree tempargs;
ARGS contains template arguments from all levels. */
static int
-verify_class_unification (targs, parms, args)
- tree targs, parms, args;
+verify_class_unification (tree targs, tree parms, tree args)
{
parms = tsubst (parms, add_outermost_template_args (args, targs),
tf_none, NULL_TREE);
TARGS are as for unify. */
static tree
-try_class_unification (tparms, targs, parm, arg)
- tree tparms;
- tree targs;
- tree parm;
- tree arg;
+try_class_unification (tree tparms, tree targs, tree parm, tree arg)
{
tree copy_of_targs;
for the base class of ARG that we are currently examining. */
static tree
-get_template_base_recursive (tparms, targs, parm,
- arg_binfo, rval, flags)
- tree tparms;
- tree targs;
- tree arg_binfo;
- tree rval;
- tree parm;
- int flags;
+get_template_base_recursive (tree tparms,
+ tree targs,
+ tree parm,
+ tree arg_binfo,
+ tree rval,
+ int flags)
{
tree binfos;
int i, n_baselinks;
as well as a plain template type. Used by unify. */
static tree
-get_template_base (tparms, targs, parm, arg)
- tree tparms;
- tree targs;
- tree parm;
- tree arg;
+get_template_base (tree tparms, tree targs, tree parm, tree arg)
{
tree rval;
tree arg_binfo;
/* Returns the level of DECL, which declares a template parameter. */
static int
-template_decl_level (decl)
- tree decl;
+template_decl_level (tree decl)
{
switch (TREE_CODE (decl))
{
Returns nonzero iff the unification is OK on that basis.*/
static int
-check_cv_quals_for_unify (strict, arg, parm)
- int strict;
- tree arg;
- tree parm;
+check_cv_quals_for_unify (int strict, tree arg, tree parm)
{
int arg_quals = cp_type_quals (arg);
int parm_quals = cp_type_quals (parm);
folding PARM. */
static int
-unify (tparms, targs, parm, arg, strict)
- tree tparms, targs, parm, arg;
- int strict;
+unify (tree tparms, tree targs, tree parm, tree arg, int strict)
{
int idx;
tree targ;
instantiation of RESULT has been assigned to this file. */
void
-mark_decl_instantiated (result, extern_p)
- tree result;
- int extern_p;
+mark_decl_instantiated (tree result, int extern_p)
{
/* We used to set this unconditionally; we moved that to
do_decl_instantiation so it wouldn't get set on members of
LEN is passed through to fn_type_unification. */
int
-more_specialized (pat1, pat2, deduce, len)
- tree pat1, pat2;
- int deduce;
- int len;
+more_specialized (tree pat1, tree pat2, int deduce, int len)
{
tree targs;
int winner = 0;
0 if neither is more specialized. */
int
-more_specialized_class (pat1, pat2)
- tree pat1, pat2;
+more_specialized_class (tree pat1, tree pat2)
{
tree targs;
int winner = 0;
found. DEDUCE and LEN are passed through to fn_type_unification. */
static tree
-get_bindings_real (fn, decl, explicit_args, check_rettype, deduce, len)
- tree fn, decl, explicit_args;
- int check_rettype, deduce, len;
+get_bindings_real (tree fn,
+ tree decl,
+ tree explicit_args,
+ int check_rettype,
+ int deduce,
+ int len)
{
int ntparms = DECL_NTPARMS (fn);
tree targs = make_tree_vec (ntparms);
/* For most uses, we want to check the return type. */
tree
-get_bindings (fn, decl, explicit_args)
- tree fn, decl, explicit_args;
+get_bindings (tree fn, tree decl, tree explicit_args)
{
return get_bindings_real (fn, decl, explicit_args, 1, DEDUCE_EXACT, -1);
}
types. */
static tree
-get_bindings_overload (fn, decl, explicit_args)
- tree fn, decl, explicit_args;
+get_bindings_overload (tree fn, tree decl, tree explicit_args)
{
return get_bindings_real (fn, decl, explicit_args, 0, DEDUCE_EXACT, -1);
}
is bound to `double'. */
static tree
-get_class_bindings (tparms, parms, args)
- tree tparms, parms, args;
+get_class_bindings (tree tparms, tree parms, tree args)
{
int i, ntparms = TREE_VEC_LENGTH (tparms);
tree vec = make_tree_vec (ntparms);
NULL_TREE is returned. */
tree
-most_specialized_instantiation (instantiations)
- tree instantiations;
+most_specialized_instantiation (tree instantiations)
{
tree fn, champ;
int fate;
arguments EXPLICIT_ARGS. */
static tree
-most_specialized (fns, decl, explicit_args)
- tree fns, decl, explicit_args;
+most_specialized (tree fns, tree decl, tree explicit_args)
{
tree candidates = NULL_TREE;
tree fn, args;
`template <class T> template <class U> S<T*>::f(U)'. */
tree
-most_general_template (decl)
- tree decl;
+most_general_template (tree decl)
{
/* If DECL is a FUNCTION_DECL, find the TEMPLATE_DECL of which it is
an immediate specialization. */
error_mark_node if the choice is ambiguous. */
static tree
-most_specialized_class (tmpl, args)
- tree tmpl;
- tree args;
+most_specialized_class (tree tmpl, tree args)
{
tree list = NULL_TREE;
tree t;
}
void
-mark_class_instantiated (t, extern_p)
- tree t;
- int extern_p;
+mark_class_instantiated (tree t, int extern_p)
{
SET_CLASSTYPE_EXPLICIT_INSTANTIATION (t);
SET_CLASSTYPE_INTERFACE_KNOWN (t);
since the standard is unclear (as detailed below). */
void
-do_type_instantiation (t, storage, complain)
- tree t, storage;
- tsubst_flags_t complain;
+do_type_instantiation (tree t, tree storage, tsubst_flags_t complain)
{
int extern_p = 0;
int nomem_p = 0;
to instantiate the DECL, we regenerate it. */
static void
-regenerate_decl_from_template (decl, tmpl)
- tree decl;
- tree tmpl;
+regenerate_decl_from_template (tree decl, tree tmpl)
{
/* The most general version of TMPL. */
tree gen_tmpl;
instantiation now; we just have to do it sometime. */
tree
-instantiate_decl (d, defer_ok)
- tree d;
- int defer_ok;
+instantiate_decl (tree d, int defer_ok)
{
tree tmpl = DECL_TI_TEMPLATE (d);
tree gen_args;
instantiate, and instantiate any we can. */
int
-instantiate_pending_templates ()
+instantiate_pending_templates (void)
{
tree *t;
tree last = NULL_TREE;
instantiate_decl. */
static tree
-tsubst_initializer_list (t, argvec)
- tree t, argvec;
+tsubst_initializer_list (tree t, tree argvec)
{
tree inits = NULL_TREE;
/* Set CURRENT_ACCESS_SPECIFIER based on the protection of DECL. */
static void
-set_current_access_from_decl (decl)
- tree decl;
+set_current_access_from_decl (tree decl)
{
if (TREE_PRIVATE (decl))
current_access_specifier = access_private_node;
start_enum) and ARGS are the template arguments to use. */
static void
-tsubst_enum (tag, newtag, args)
- tree tag;
- tree newtag;
- tree args;
+tsubst_enum (tree tag, tree newtag, tree args)
{
tree e;
the type. */
tree
-get_mostly_instantiated_function_type (decl)
- tree decl;
+get_mostly_instantiated_function_type (tree decl)
{
tree fn_type;
tree tmpl;
/* Return truthvalue if we're processing a template different from
the last one involved in diagnostics. */
int
-problematic_instantiation_changed ()
+problematic_instantiation_changed (void)
{
return last_template_error_tick != tinst_level_tick;
}
/* Remember current template involved in diagnostics. */
void
-record_last_problematic_instantiation ()
+record_last_problematic_instantiation (void)
{
last_template_error_tick = tinst_level_tick;
}
tree
-current_instantiation ()
+current_instantiation (void)
{
return current_tinst_level;
}
warning messages under control of COMPLAIN. */
static int
-invalid_nontype_parm_type_p (type, complain)
- tree type;
- tsubst_flags_t complain;
+invalid_nontype_parm_type_p (tree type, tsubst_flags_t complain)
{
if (INTEGRAL_TYPE_P (type))
return 0;
[temp.dep.expr]. */
bool
-type_dependent_expression_p (expression)
- tree expression;
+type_dependent_expression_p (tree expression)
{
if (!processing_template_decl)
return false;
parsing into this file; that will make implementing the new parser
much easier since it will be able to make use of these routines. */
-static tree maybe_convert_cond PARAMS ((tree));
-static tree simplify_aggr_init_exprs_r PARAMS ((tree *, int *, void *));
-static void emit_associated_thunks PARAMS ((tree));
-static void genrtl_try_block PARAMS ((tree));
-static void genrtl_eh_spec_block PARAMS ((tree));
-static void genrtl_handler PARAMS ((tree));
-static void cp_expand_stmt PARAMS ((tree));
-static void genrtl_start_function PARAMS ((tree));
-static void genrtl_finish_function PARAMS ((tree));
-static tree clear_decl_rtl PARAMS ((tree *, int *, void *));
+static tree maybe_convert_cond (tree);
+static tree simplify_aggr_init_exprs_r (tree *, int *, void *);
+static void emit_associated_thunks (tree);
+static void genrtl_try_block (tree);
+static void genrtl_eh_spec_block (tree);
+static void genrtl_handler (tree);
+static void cp_expand_stmt (tree);
+static void genrtl_start_function (tree);
+static void genrtl_finish_function (tree);
+static tree clear_decl_rtl (tree *, int *, void *);
/* Finish processing the COND, the SUBSTMT condition for STMT. */
at the end of the statement. */
int
-stmts_are_full_exprs_p ()
+stmts_are_full_exprs_p (void)
{
return current_stmt_tree ()->stmts_are_full_exprs_p;
}
returned. */
stmt_tree
-current_stmt_tree ()
+current_stmt_tree (void)
{
return (cfun
? &cfun->language->base.x_stmt_tree
declared is not an anonymous union" [class.union]. */
int
-anon_aggr_type_p (node)
- tree node;
+anon_aggr_type_p (tree node)
{
return ANON_AGGR_TYPE_P (node);
}
/* Finish a scope. */
tree
-do_poplevel ()
+do_poplevel (void)
{
tree block = NULL_TREE;
/* Finish a goto-statement. */
tree
-finish_goto_stmt (destination)
- tree destination;
+finish_goto_stmt (tree destination)
{
if (TREE_CODE (destination) == IDENTIFIER_NODE)
destination = lookup_label (destination);
statement. Convert it to a boolean value, if appropriate. */
tree
-maybe_convert_cond (cond)
- tree cond;
+maybe_convert_cond (tree cond)
{
/* Empty conditions remain empty. */
if (!cond)
/* Finish an expression-statement, whose EXPRESSION is as indicated. */
tree
-finish_expr_stmt (expr)
- tree expr;
+finish_expr_stmt (tree expr)
{
tree r = NULL_TREE;
tree expr_type = NULL_TREE;;
appropriate. */
tree
-begin_if_stmt ()
+begin_if_stmt (void)
{
tree r;
do_pushlevel (sk_block);
IF_STMT. */
void
-finish_if_stmt_cond (cond, if_stmt)
- tree cond;
- tree if_stmt;
+finish_if_stmt_cond (tree cond, tree if_stmt)
{
cond = maybe_convert_cond (cond);
FINISH_COND (cond, if_stmt, IF_COND (if_stmt));
IF_STMT. */
tree
-finish_then_clause (if_stmt)
- tree if_stmt;
+finish_then_clause (tree if_stmt)
{
RECHAIN_STMTS (if_stmt, THEN_CLAUSE (if_stmt));
return if_stmt;
/* Begin the else-clause of an if-statement. */
void
-begin_else_clause ()
+begin_else_clause (void)
{
}
IF_STMT. */
void
-finish_else_clause (if_stmt)
- tree if_stmt;
+finish_else_clause (tree if_stmt)
{
RECHAIN_STMTS (if_stmt, ELSE_CLAUSE (if_stmt));
}
/* Finish an if-statement. */
void
-finish_if_stmt ()
+finish_if_stmt (void)
{
finish_stmt ();
do_poplevel ();
appropriate. */
tree
-begin_while_stmt ()
+begin_while_stmt (void)
{
tree r;
r = build_stmt (WHILE_STMT, NULL_TREE, NULL_TREE);
WHILE_STMT. */
void
-finish_while_stmt_cond (cond, while_stmt)
- tree cond;
- tree while_stmt;
+finish_while_stmt_cond (tree cond, tree while_stmt)
{
cond = maybe_convert_cond (cond);
if (processing_template_decl)
/* Finish a while-statement, which may be given by WHILE_STMT. */
void
-finish_while_stmt (while_stmt)
- tree while_stmt;
+finish_while_stmt (tree while_stmt)
{
do_poplevel ();
RECHAIN_STMTS (while_stmt, WHILE_BODY (while_stmt));
appropriate. */
tree
-begin_do_stmt ()
+begin_do_stmt (void)
{
tree r = build_stmt (DO_STMT, NULL_TREE, NULL_TREE);
add_stmt (r);
/* Finish the body of a do-statement, which may be given by DO_STMT. */
void
-finish_do_body (do_stmt)
- tree do_stmt;
+finish_do_body (tree do_stmt)
{
RECHAIN_STMTS (do_stmt, DO_BODY (do_stmt));
}
COND is as indicated. */
void
-finish_do_stmt (cond, do_stmt)
- tree cond;
- tree do_stmt;
+finish_do_stmt (tree cond, tree do_stmt)
{
cond = maybe_convert_cond (cond);
DO_COND (do_stmt) = cond;
indicated. */
tree
-finish_return_stmt (expr)
- tree expr;
+finish_return_stmt (tree expr)
{
tree r;
/* Begin a for-statement. Returns a new FOR_STMT if appropriate. */
tree
-begin_for_stmt ()
+begin_for_stmt (void)
{
tree r;
given by FOR_STMT. */
void
-finish_for_init_stmt (for_stmt)
- tree for_stmt;
+finish_for_init_stmt (tree for_stmt)
{
if (last_tree != for_stmt)
RECHAIN_STMTS (for_stmt, FOR_INIT_STMT (for_stmt));
FOR_STMT. */
void
-finish_for_cond (cond, for_stmt)
- tree cond;
- tree for_stmt;
+finish_for_cond (tree cond, tree for_stmt)
{
cond = maybe_convert_cond (cond);
if (processing_template_decl)
given by FOR_STMT. */
void
-finish_for_expr (expr, for_stmt)
- tree expr;
- tree for_stmt;
+finish_for_expr (tree expr, tree for_stmt)
{
FOR_EXPR (for_stmt) = expr;
}
provided. */
void
-finish_for_stmt (for_stmt)
- tree for_stmt;
+finish_for_stmt (tree for_stmt)
{
/* Pop the scope for the body of the loop. */
do_poplevel ();
/* Finish a break-statement. */
tree
-finish_break_stmt ()
+finish_break_stmt (void)
{
return add_stmt (build_break_stmt ());
}
/* Finish a continue-statement. */
tree
-finish_continue_stmt ()
+finish_continue_stmt (void)
{
return add_stmt (build_continue_stmt ());
}
appropriate. */
tree
-begin_switch_stmt ()
+begin_switch_stmt (void)
{
tree r;
do_pushlevel (sk_block);
/* Finish the cond of a switch-statement. */
void
-finish_switch_cond (cond, switch_stmt)
- tree cond;
- tree switch_stmt;
+finish_switch_cond (tree cond, tree switch_stmt)
{
tree orig_type = NULL;
if (!processing_template_decl)
SWITCH_STMT. The COND to switch on is indicated. */
void
-finish_switch_stmt (switch_stmt)
- tree switch_stmt;
+finish_switch_stmt (tree switch_stmt)
{
RECHAIN_STMTS (switch_stmt, SWITCH_BODY (switch_stmt));
pop_switch ();
/* Generate the RTL for T, which is a TRY_BLOCK. */
static void
-genrtl_try_block (t)
- tree t;
+genrtl_try_block (tree t)
{
if (CLEANUP_P (t))
{
/* Generate the RTL for T, which is an EH_SPEC_BLOCK. */
static void
-genrtl_eh_spec_block (t)
- tree t;
+genrtl_eh_spec_block (tree t)
{
expand_eh_region_start ();
expand_stmt (EH_SPEC_STMTS (t));
appropriate. */
tree
-begin_try_block ()
+begin_try_block (void)
{
tree r = build_stmt (TRY_BLOCK, NULL_TREE, NULL_TREE);
add_stmt (r);
/* Likewise, for a function-try-block. */
tree
-begin_function_try_block ()
+begin_function_try_block (void)
{
tree r = build_stmt (TRY_BLOCK, NULL_TREE, NULL_TREE);
FN_TRY_BLOCK_P (r) = 1;
/* Finish a try-block, which may be given by TRY_BLOCK. */
void
-finish_try_block (try_block)
- tree try_block;
+finish_try_block (tree try_block)
{
RECHAIN_STMTS (try_block, TRY_STMTS (try_block));
}
TRY_BLOCK. */
void
-finish_cleanup_try_block (try_block)
- tree try_block;
+finish_cleanup_try_block (tree try_block)
{
RECHAIN_STMTS (try_block, TRY_STMTS (try_block));
}
by CLEANUP. */
void
-finish_cleanup (cleanup, try_block)
- tree cleanup;
- tree try_block;
+finish_cleanup (tree cleanup, tree try_block)
{
TRY_HANDLERS (try_block) = cleanup;
CLEANUP_P (try_block) = 1;
/* Likewise, for a function-try-block. */
void
-finish_function_try_block (try_block)
- tree try_block;
+finish_function_try_block (tree try_block)
{
if (TREE_CHAIN (try_block)
&& TREE_CODE (TREE_CHAIN (try_block)) == CTOR_INITIALIZER)
TRY_BLOCK. */
void
-finish_handler_sequence (try_block)
- tree try_block;
+finish_handler_sequence (tree try_block)
{
RECHAIN_STMTS (try_block, TRY_HANDLERS (try_block));
check_handlers (TRY_HANDLERS (try_block));
/* Likewise, for a function-try-block. */
void
-finish_function_handler_sequence (try_block)
- tree try_block;
+finish_function_handler_sequence (tree try_block)
{
in_function_try_handler = 0;
RECHAIN_STMTS (try_block, TRY_HANDLERS (try_block));
/* Generate the RTL for T, which is a HANDLER. */
static void
-genrtl_handler (t)
- tree t;
+genrtl_handler (tree t)
{
genrtl_do_pushlevel ();
if (!processing_template_decl)
/* Begin a handler. Returns a HANDLER if appropriate. */
tree
-begin_handler ()
+begin_handler (void)
{
tree r;
r = build_stmt (HANDLER, NULL_TREE, NULL_TREE);
if this is a `catch (...)' clause. */
void
-finish_handler_parms (decl, handler)
- tree decl;
- tree handler;
+finish_handler_parms (tree decl, tree handler)
{
tree type = NULL_TREE;
if (processing_template_decl)
the return value from the matching call to finish_handler_parms. */
void
-finish_handler (handler)
- tree handler;
+finish_handler (tree handler)
{
if (!processing_template_decl)
expand_end_catch_block ();
COMPOUND_STMT if appropriate. */
tree
-begin_compound_stmt (has_no_scope)
- int has_no_scope;
+begin_compound_stmt (int has_no_scope)
{
tree r;
int is_try = 0;
a scope. */
tree
-finish_compound_stmt (has_no_scope, compound_stmt)
- int has_no_scope;
- tree compound_stmt;
+finish_compound_stmt (int has_no_scope, tree compound_stmt)
{
tree r;
tree t;
CLOBBERS. */
tree
-finish_asm_stmt (cv_qualifier, string, output_operands,
- input_operands, clobbers)
- tree cv_qualifier;
- tree string;
- tree output_operands;
- tree input_operands;
- tree clobbers;
+finish_asm_stmt (tree cv_qualifier,
+ tree string,
+ tree output_operands,
+ tree input_operands,
+ tree clobbers)
{
tree r;
tree t;
/* Finish a label with the indicated NAME. */
tree
-finish_label_stmt (name)
- tree name;
+finish_label_stmt (tree name)
{
tree decl = define_label (input_filename, input_line, name);
return add_stmt (build_stmt (LABEL_STMT, decl));
is useful when writing code involving statement-expressions. */
void
-finish_label_decl (name)
- tree name;
+finish_label_decl (tree name)
{
tree decl = declare_local_label (name);
add_decl_stmt (decl);
/* When DECL goes out of scope, make sure that CLEANUP is executed. */
void
-finish_decl_cleanup (decl, cleanup)
- tree decl;
- tree cleanup;
+finish_decl_cleanup (tree decl, tree cleanup)
{
add_stmt (build_stmt (CLEANUP_STMT, decl, cleanup));
}
/* If the current scope exits with an exception, run CLEANUP. */
void
-finish_eh_cleanup (cleanup)
- tree cleanup;
+finish_eh_cleanup (tree cleanup)
{
tree r = build_stmt (CLEANUP_STMT, NULL_TREE, cleanup);
CLEANUP_EH_ONLY (r) = 1;
/* Returns the stack of SCOPE_STMTs for the current function. */
tree *
-current_scope_stmt_stack ()
+current_scope_stmt_stack (void)
{
return &cfun->language->base.x_scope_stmt_stack;
}
/* Finish a parenthesized expression EXPR. */
tree
-finish_parenthesized_expr (expr)
- tree expr;
+finish_parenthesized_expr (tree expr)
{
if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (expr))))
/* This inhibits warnings in c_common_truthvalue_conversion. */
finish_stmt_expr. */
tree
-begin_stmt_expr ()
+begin_stmt_expr (void)
{
/* If we're outside a function, we won't have a statement-tree to
work with. But, if we see a statement-expression we need to
function. */
tree
-begin_global_stmt_expr ()
+begin_global_stmt_expr (void)
{
if (! cfun && !last_tree)
begin_stmt_tree (&scope_chain->x_saved_tree);
/* Finish the STMT_EXPR last begun with begin_global_stmt_expr. */
tree
-finish_global_stmt_expr (stmt_expr)
- tree stmt_expr;
+finish_global_stmt_expr (tree stmt_expr)
{
stmt_expr = expand_end_stmt_expr (stmt_expr);
statement-expression. */
tree
-finish_stmt_expr (rtl_expr)
- tree rtl_expr;
+finish_stmt_expr (tree rtl_expr)
{
tree result;
POSTDECREMENT_EXPR.) */
tree
-finish_increment_expr (expr, code)
- tree expr;
- enum tree_code code;
+finish_increment_expr (tree expr, enum tree_code code)
{
/* If we get an OFFSET_REF, turn it into what it really means (e.g.,
a COMPONENT_REF). This way if we've got, say, a reference to a
/* Finish a use of `this'. Returns an expression for `this'. */
tree
-finish_this_expr ()
+finish_this_expr (void)
{
tree result;
FN. Returns an expression for the call. */
tree
-finish_object_call_expr (fn, object, args)
- tree fn;
- tree object;
- tree args;
+finish_object_call_expr (tree fn, tree object, tree args)
{
if (DECL_DECLARES_TYPE_P (fn))
{
arguments to FN. Returns an expression for the call. */
tree
-finish_qualified_object_call_expr (fn, object, args)
- tree fn;
- tree object;
- tree args;
+finish_qualified_object_call_expr (tree fn, tree object, tree args)
{
return build_scoped_method_call (object, TREE_OPERAND (fn, 0),
TREE_OPERAND (fn, 1), args);
was of the form `OBJECT.SCOPE::~DESTRUCTOR'. */
tree
-finish_pseudo_destructor_expr (object, scope, destructor)
- tree object;
- tree scope;
- tree destructor;
+finish_pseudo_destructor_expr (tree object, tree scope, tree destructor)
{
if (destructor == error_mark_node)
return error_mark_node;
/* Finish an expression of the form CODE EXPR. */
tree
-finish_unary_op_expr (code, expr)
- enum tree_code code;
- tree expr;
+finish_unary_op_expr (enum tree_code code, tree expr)
{
tree result = build_x_unary_op (code, expr);
/* Inside a template, build_x_unary_op does not fold the
the INITIALIZER_LIST is being cast. */
tree
-finish_compound_literal (type, initializer_list)
- tree type;
- tree initializer_list;
+finish_compound_literal (tree type, tree initializer_list)
{
tree compound_literal;
valid. */
int
-begin_function_definition (decl_specs, attributes, declarator)
- tree decl_specs;
- tree attributes;
- tree declarator;
+begin_function_definition (tree decl_specs, tree attributes, tree declarator)
{
if (!start_function (decl_specs, declarator, attributes, SF_DEFAULT))
return 0;
/* Finish a translation unit. */
void
-finish_translation_unit ()
+finish_translation_unit (void)
{
/* In case there were missing closebraces,
get us back to the global binding level. */
Returns the parameter. */
tree
-finish_template_type_parm (aggr, identifier)
- tree aggr;
- tree identifier;
+finish_template_type_parm (tree aggr, tree identifier)
{
if (aggr != class_type_node)
{
Returns the parameter. */
tree
-finish_template_template_parm (aggr, identifier)
- tree aggr;
- tree identifier;
+finish_template_template_parm (tree aggr, tree identifier)
{
tree decl = build_decl (TYPE_DECL, identifier, NULL_TREE);
tree tmpl = build_lang_decl (TEMPLATE_DECL, identifier, NULL_TREE);
nonzero, the parameter list was terminated by a `...'. */
tree
-finish_parmlist (parms, ellipsis)
- tree parms;
- int ellipsis;
+finish_parmlist (tree parms, int ellipsis)
{
if (parms)
{
/* Begin a class definition, as indicated by T. */
tree
-begin_class_definition (t)
- tree t;
+begin_class_definition (tree t)
{
if (t == error_mark_node)
return error_mark_node;
/* Finish the member declaration given by DECL. */
void
-finish_member_declaration (decl)
- tree decl;
+finish_member_declaration (tree decl)
{
if (decl == error_mark_node || decl == NULL_TREE)
return;
type. */
tree
-finish_class_definition (t, attributes, semi, pop_scope_p)
- tree t;
- tree attributes;
- int semi;
- int pop_scope_p;
+finish_class_definition (tree t, tree attributes, int semi, int pop_scope_p)
{
if (t == error_mark_node)
return error_mark_node;
TYPES whose template parameters are given by PARMS. */
tree
-finish_member_class_template (types)
- tree types;
+finish_member_class_template (tree types)
{
tree t;
the template parameters. */
void
-finish_template_decl (parms)
- tree parms;
+finish_template_decl (tree parms)
{
if (parms)
end_template_decl ();
the scope of template-id indicated. */
tree
-finish_template_type (name, args, entering_scope)
- tree name;
- tree args;
- int entering_scope;
+finish_template_type (tree name, tree args, int entering_scope)
{
tree decl;
premitted in this context, an error is issued. */
void
-check_multiple_declarators ()
+check_multiple_declarators (void)
{
/* [temp]
use as a type-specifier. */
tree
-finish_typeof (expr)
- tree expr;
+finish_typeof (tree expr)
{
tree type;
/* Compute the value of the `sizeof' operator. */
tree
-finish_sizeof (t)
- tree t;
+finish_sizeof (tree t)
{
return TYPE_P (t) ? cxx_sizeof (t) : expr_sizeof (t);
}
alignment of T, measured in bytes. */
tree
-finish_alignof (t)
- tree t;
+finish_alignof (tree t)
{
if (processing_template_decl)
return build_min (ALIGNOF_EXPR, size_type_node, t);
other statements at its nesting level. */
static void
-cp_expand_stmt (t)
- tree t;
+cp_expand_stmt (tree t)
{
switch (TREE_CODE (t))
{
will equivalent CALL_EXPRs. */
static tree
-simplify_aggr_init_exprs_r (tp, walk_subtrees, data)
- tree *tp;
- int *walk_subtrees ATTRIBUTE_UNUSED;
- void *data ATTRIBUTE_UNUSED;
+simplify_aggr_init_exprs_r (tree* tp,
+ int* walk_subtrees ATTRIBUTE_UNUSED ,
+ void* data ATTRIBUTE_UNUSED )
{
tree aggr_init_expr;
tree call_expr;
/* Emit all thunks to FN that should be emitted when FN is emitted. */
static void
-emit_associated_thunks (fn)
- tree fn;
+emit_associated_thunks (tree fn)
{
/* When we use vcall offsets, we emit thunks with the virtual
functions to which they thunk. The whole point of vcall offsets
/* Generate RTL for FN. */
void
-expand_body (fn)
- tree fn;
+expand_body (tree fn)
{
location_t saved_loc;
tree saved_function;
value optimization. */
tree
-nullify_returns_r (tp, walk_subtrees, data)
- tree *tp;
- int *walk_subtrees;
- void *data;
+nullify_returns_r (tree* tp, int* walk_subtrees, void* data)
{
tree nrv = (tree) data;
/* Start generating the RTL for FN. */
static void
-genrtl_start_function (fn)
- tree fn;
+genrtl_start_function (tree fn)
{
/* Tell everybody what function we're processing. */
current_function_decl = fn;
/* Finish generating the RTL for FN. */
static void
-genrtl_finish_function (fn)
- tree fn;
+genrtl_finish_function (tree fn)
{
tree t;
its sub-blocks. */
static tree
-clear_decl_rtl (tp, walk_subtrees, data)
- tree *tp;
- int *walk_subtrees ATTRIBUTE_UNUSED;
- void *data ATTRIBUTE_UNUSED;
+clear_decl_rtl (tree* tp,
+ int* walk_subtrees ATTRIBUTE_UNUSED ,
+ void* data ATTRIBUTE_UNUSED )
{
if (nonstatic_local_decl_p (*tp))
SET_DECL_RTL (*tp, NULL_RTX);
/* Perform initialization related to this module. */
void
-init_cp_semantics ()
+init_cp_semantics (void)
{
lang_expand_stmt = cp_expand_stmt;
}