extern int inhibit_warnings;
-static tree build_field_call PARAMS ((tree, tree, tree));
-static struct z_candidate * tourney PARAMS ((struct z_candidate *));
-static int equal_functions PARAMS ((tree, tree));
-static int joust PARAMS ((struct z_candidate *, struct z_candidate *, int));
-static int compare_ics PARAMS ((tree, tree));
-static tree build_over_call PARAMS ((struct z_candidate *, tree, int));
-static tree build_java_interface_fn_ref PARAMS ((tree, tree));
+static tree build_field_call (tree, tree, tree);
+static struct z_candidate * tourney (struct z_candidate *);
+static int equal_functions (tree, tree);
+static int joust (struct z_candidate *, struct z_candidate *, bool);
+static int compare_ics (tree, tree);
+static tree build_over_call (struct z_candidate *, tree, int);
+static tree build_java_interface_fn_ref (tree, tree);
#define convert_like(CONV, EXPR) \
convert_like_real ((CONV), (EXPR), NULL_TREE, 0, 0)
#define convert_like_with_context(CONV, EXPR, FN, ARGNO) \
convert_like_real ((CONV), (EXPR), (FN), (ARGNO), 0)
-static tree convert_like_real PARAMS ((tree, tree, tree, int, int));
-static void op_error PARAMS ((enum tree_code, enum tree_code, tree, tree,
- tree, const char *));
-static tree build_object_call PARAMS ((tree, tree));
-static tree resolve_args PARAMS ((tree));
-static struct z_candidate * build_user_type_conversion_1
- PARAMS ((tree, tree, int));
-static void print_z_candidates PARAMS ((struct z_candidate *));
-static tree build_this PARAMS ((tree));
-static struct z_candidate * splice_viable PARAMS ((struct z_candidate *));
-static int any_viable PARAMS ((struct z_candidate *));
-static int any_strictly_viable PARAMS ((struct z_candidate *));
-static struct z_candidate * add_template_candidate
- PARAMS ((struct z_candidate *, tree, tree, tree, tree, tree,
- tree, tree, int, unification_kind_t));
-static struct z_candidate * add_template_candidate_real
- PARAMS ((struct z_candidate *, tree, tree, tree, tree, tree,
- tree, tree, int, tree, unification_kind_t));
-static struct z_candidate * add_template_conv_candidate
- PARAMS ((struct z_candidate *, tree, tree, tree, tree, tree, tree));
-static struct z_candidate * add_builtin_candidates
- PARAMS ((struct z_candidate *, enum tree_code, enum tree_code,
- tree, tree *, int));
-static struct z_candidate * add_builtin_candidate
- PARAMS ((struct z_candidate *, enum tree_code, enum tree_code,
- tree, tree, tree, tree *, tree *, int));
-static int is_complete PARAMS ((tree));
-static struct z_candidate * build_builtin_candidate
- PARAMS ((struct z_candidate *, tree, tree, tree, tree *, tree *,
- int));
-static struct z_candidate * add_conv_candidate
- PARAMS ((struct z_candidate *, tree, tree, tree, tree, tree));
-static struct z_candidate * add_function_candidate
+static tree convert_like_real (tree, tree, tree, int, int);
+static void op_error (enum tree_code, enum tree_code, tree, tree,
+ tree, const char *);
+static tree build_object_call (tree, tree);
+static tree resolve_args (tree);
+static struct z_candidate *build_user_type_conversion_1 (tree, tree, int);
+static void print_z_candidates (struct z_candidate *);
+static tree build_this (tree);
+static struct z_candidate *splice_viable (struct z_candidate *);
+static bool any_viable (struct z_candidate *);
+static bool any_strictly_viable (struct z_candidate *);
+static struct z_candidate *add_template_candidate
+ (struct z_candidate *, tree, tree, tree, tree, tree,
+ tree, tree, int, unification_kind_t);
+static struct z_candidate *add_template_candidate_real
+ (struct z_candidate *, tree, tree, tree, tree, tree,
+ tree, tree, int, tree, unification_kind_t);
+static struct z_candidate *add_template_conv_candidate
+ (struct z_candidate *, tree, tree, tree, tree, tree, tree);
+static struct z_candidate *add_builtin_candidates
+ (struct z_candidate *, enum tree_code, enum tree_code,
+ tree, tree *, int);
+static struct z_candidate *add_builtin_candidate
+ (struct z_candidate *, enum tree_code, enum tree_code,
+ tree, tree, tree, tree *, tree *, int);
+static bool is_complete (tree);
+static struct z_candidate *build_builtin_candidate
+ (struct z_candidate *, tree, tree, tree, tree *, tree *,
+ int);
+static struct z_candidate *add_conv_candidate
+ (struct z_candidate *, tree, tree, tree, tree, tree);
+static struct z_candidate *add_function_candidate
(struct z_candidate *, tree, tree, tree, tree, tree, int);
-static tree implicit_conversion PARAMS ((tree, tree, tree, int));
-static tree standard_conversion PARAMS ((tree, tree, tree));
-static tree reference_binding PARAMS ((tree, tree, tree, int));
-static tree non_reference PARAMS ((tree));
-static tree build_conv PARAMS ((enum tree_code, tree, tree));
-static int is_subseq PARAMS ((tree, tree));
-static tree maybe_handle_ref_bind PARAMS ((tree*));
-static void maybe_handle_implicit_object PARAMS ((tree*));
+static tree implicit_conversion (tree, tree, tree, int);
+static tree standard_conversion (tree, tree, tree);
+static tree reference_binding (tree, tree, tree, int);
+static tree non_reference (tree);
+static tree build_conv (enum tree_code, tree, tree);
+static bool is_subseq (tree, tree);
+static tree maybe_handle_ref_bind (tree *);
+static void maybe_handle_implicit_object (tree *);
static struct z_candidate *add_candidate
(struct z_candidate *, tree, tree, tree, tree, int);
-static tree source_type PARAMS ((tree));
-static void add_warning PARAMS ((struct z_candidate *, struct z_candidate *));
-static int reference_related_p PARAMS ((tree, tree));
-static int reference_compatible_p PARAMS ((tree, tree));
-static tree convert_class_to_reference PARAMS ((tree, tree, tree));
-static tree direct_reference_binding PARAMS ((tree, tree));
-static int promoted_arithmetic_type_p PARAMS ((tree));
-static tree conditional_conversion PARAMS ((tree, tree));
-static tree call_builtin_trap PARAMS ((void));
+static tree source_type (tree);
+static void add_warning (struct z_candidate *, struct z_candidate *);
+static bool reference_related_p (tree, tree);
+static bool reference_compatible_p (tree, tree);
+static tree convert_class_to_reference (tree, tree, tree);
+static tree direct_reference_binding (tree, tree);
+static bool promoted_arithmetic_type_p (tree);
+static tree conditional_conversion (tree, tree);
+static tree call_builtin_trap (void);
tree
-build_vfield_ref (datum, type)
- tree datum, type;
+build_vfield_ref (tree datum, tree type)
{
if (datum == error_mark_node)
return error_mark_node;
(a BIT_NOT_EXPR) matches BASETYPE. The operand of NAME can take many
forms... */
-int
-check_dtor_name (basetype, name)
- tree basetype, name;
+bool
+check_dtor_name (tree basetype, tree name)
{
name = TREE_OPERAND (name, 0);
/* Just accept something we've already complained about. */
if (name == error_mark_node)
- return 1;
+ return true;
if (TREE_CODE (name) == TYPE_DECL)
name = TREE_TYPE (name);
NAME will be a class template. */
else if (DECL_CLASS_TEMPLATE_P (name))
- return 0;
+ return false;
else
abort ();
if (name && TYPE_MAIN_VARIANT (basetype) == TYPE_MAIN_VARIANT (name))
- return 1;
- return 0;
+ return true;
+ return false;
}
/* Build a method call of the form `EXP->SCOPES::NAME (PARMS)'.
This is how virtual function calls are avoided. */
tree
-build_scoped_method_call (exp, basetype, name, parms)
- tree exp, basetype, name, parms;
+build_scoped_method_call (tree exp, tree basetype, tree name, tree parms)
{
/* Because this syntactic form does not allow
a pointer to a base class to be `stolen',
pointer-to-member function. */
tree
-build_addr_func (function)
- tree function;
+build_addr_func (tree function)
{
tree type = TREE_TYPE (function);
(TYPE_PTRMEMFUNC_P) must be handled by our callers. */
tree
-build_call (function, parms)
- tree function, parms;
+build_call (tree function, tree parms)
{
int is_constructor = 0;
int nothrow;
#endif
tree
-build_method_call (instance, name, parms, basetype_path, flags)
- tree instance, name, parms, basetype_path;
- int flags;
+build_method_call (tree instance, tree name, tree parms,
+ tree basetype_path, int flags)
{
tree fn;
tree object_type;
#define USER_CONV_CAND(NODE) WRAPPER_ZC (TREE_OPERAND (NODE, 1))
#define USER_CONV_FN(NODE) (USER_CONV_CAND (NODE)->fn)
-int
-null_ptr_cst_p (t)
- tree t;
+bool
+null_ptr_cst_p (tree t)
{
/* [conv.ptr]
(_expr.const_) rvalue of integer type that evaluates to zero. */
if (t == null_node
|| (CP_INTEGRAL_TYPE_P (TREE_TYPE (t)) && integer_zerop (t)))
- return 1;
- return 0;
+ return true;
+ return false;
}
/* Returns nonzero if PARMLIST consists of only default parms and/or
ellipsis. */
-int
-sufficient_parms_p (parmlist)
- tree parmlist;
+bool
+sufficient_parms_p (tree parmlist)
{
for (; parmlist && parmlist != void_list_node;
parmlist = TREE_CHAIN (parmlist))
if (!TREE_PURPOSE (parmlist))
- return 0;
- return 1;
+ return false;
+ return true;
}
static tree
-build_conv (code, type, from)
- enum tree_code code;
- tree type, from;
+build_conv (enum tree_code code, tree type, tree from)
{
tree t;
int rank = ICS_STD_RANK (from);
Otherwise, return T itself. */
static tree
-non_reference (t)
- tree t;
+non_reference (tree t)
{
if (TREE_CODE (t) == REFERENCE_TYPE)
t = TREE_TYPE (t);
}
tree
-strip_top_quals (t)
- tree t;
+strip_top_quals (tree t)
{
if (TREE_CODE (t) == ARRAY_TYPE)
return t;
also pass the expression EXPR to convert from. */
static tree
-standard_conversion (to, from, expr)
- tree to, from, expr;
+standard_conversion (tree to, tree from, tree expr)
{
enum tree_code fcode, tcode;
tree conv;
- int fromref = 0;
+ bool fromref = false;
if (TREE_CODE (to) == REFERENCE_TYPE)
to = TREE_TYPE (to);
if (TREE_CODE (from) == REFERENCE_TYPE)
{
- fromref = 1;
+ fromref = true;
from = TREE_TYPE (from);
}
to = strip_top_quals (to);
/* Returns nonzero if T1 is reference-related to T2. */
-static int
-reference_related_p (t1, t2)
- tree t1;
- tree t2;
+static bool
+reference_related_p (tree t1, tree t2)
{
t1 = TYPE_MAIN_VARIANT (t1);
t2 = TYPE_MAIN_VARIANT (t2);
/* Returns nonzero if T1 is reference-compatible with T2. */
-static int
-reference_compatible_p (t1, t2)
- tree t1;
- tree t2;
+static bool
+reference_compatible_p (tree t1, tree t2)
{
/* [dcl.init.ref]
converted to T as in [over.match.ref]. */
static tree
-convert_class_to_reference (t, s, expr)
- tree t;
- tree s;
- tree expr;
+convert_class_to_reference (tree t, tree s, tree expr)
{
tree conversions;
tree arglist;
Return a conversion sequence for this binding. */
static tree
-direct_reference_binding (type, conv)
- tree type;
- tree conv;
+direct_reference_binding (tree type, tree conv)
{
tree t = TREE_TYPE (type);
the conversion returned. */
static tree
-reference_binding (rto, rfrom, expr, flags)
- tree rto, rfrom, expr;
- int flags;
+reference_binding (tree rto, tree rfrom, tree expr, int flags)
{
tree conv = NULL_TREE;
tree to = TREE_TYPE (rto);
tree from = rfrom;
- int related_p;
- int compatible_p;
+ bool related_p;
+ bool compatible_p;
cp_lvalue_kind lvalue_p = clk_none;
if (TREE_CODE (to) == FUNCTION_TYPE && expr && type_unknown_p (expr))
significant. */
static tree
-implicit_conversion (to, from, expr, flags)
- tree to, from, expr;
- int flags;
+implicit_conversion (tree to, tree from, tree expr, int flags)
{
tree conv;
struct z_candidate *cand;
instead of the function. */
static struct z_candidate *
-add_conv_candidate (candidates, fn, obj, arglist, access_path,
- conversion_path)
- struct z_candidate *candidates;
- tree fn, obj, arglist;
- tree access_path;
- tree conversion_path;
+add_conv_candidate (struct z_candidate *candidates, tree fn, tree obj,
+ tree arglist, tree access_path, tree conversion_path)
{
tree totype = TREE_TYPE (TREE_TYPE (fn));
int i, len, viable, flags;
}
static struct z_candidate *
-build_builtin_candidate (candidates, fnname, type1, type2,
- args, argtypes, flags)
- struct z_candidate *candidates;
- tree fnname, type1, type2, *args, *argtypes;
- int flags;
-
+build_builtin_candidate (struct z_candidate *candidates, tree fnname,
+ tree type1, tree type2, tree *args, tree *argtypes,
+ int flags)
{
tree t, convs;
int viable = 1, i;
viable);
}
-static int
-is_complete (t)
- tree t;
+static bool
+is_complete (tree t)
{
return COMPLETE_TYPE_P (complete_type (t));
}
/* Returns nonzero if TYPE is a promoted arithmetic type. */
-static int
-promoted_arithmetic_type_p (type)
- tree type;
+static bool
+promoted_arithmetic_type_p (tree type)
{
/* [over.built]
CODE (TYPE1, TYPE1) and CODE (TYPE2, TYPE2). */
static struct z_candidate *
-add_builtin_candidate (candidates, code, code2, fnname, type1, type2,
- args, argtypes, flags)
- struct z_candidate *candidates;
- enum tree_code code, code2;
- tree fnname, type1, type2, *args, *argtypes;
- int flags;
+add_builtin_candidate (struct z_candidate *candidates, enum tree_code code,
+ enum tree_code code2, tree fnname, tree type1,
+ tree type2, tree *args, tree *argtypes, int flags)
{
switch (code)
{
}
tree
-type_decays_to (type)
- tree type;
+type_decays_to (tree type)
{
if (TREE_CODE (type) == ARRAY_TYPE)
return build_pointer_type (TREE_TYPE (type));
filter out the invalid set. */
static struct z_candidate *
-add_builtin_candidates (candidates, code, code2, fnname, args, flags)
- struct z_candidate *candidates;
- enum tree_code code, code2;
- tree fnname, *args;
- int flags;
+add_builtin_candidates (struct z_candidate *candidates, enum tree_code code,
+ enum tree_code code2, tree fnname, tree *args,
+ int flags)
{
int ref1, i;
int enum_p = 0;
add_conv_candidate. */
static struct z_candidate*
-add_template_candidate_real (candidates, tmpl, ctype, explicit_targs,
- arglist, return_type, access_path,
- conversion_path, flags, obj, strict)
- struct z_candidate *candidates;
- tree tmpl, ctype, explicit_targs, arglist, return_type;
- tree access_path;
- tree conversion_path;
- int flags;
- tree obj;
- unification_kind_t strict;
+add_template_candidate_real (struct z_candidate *candidates, tree tmpl,
+ tree ctype, tree explicit_targs, tree arglist,
+ tree return_type, tree access_path,
+ tree conversion_path, int flags, tree obj,
+ unification_kind_t strict)
{
int ntparms = DECL_NTPARMS (tmpl);
tree targs = make_tree_vec (ntparms);
static struct z_candidate *
-add_template_candidate (candidates, tmpl, ctype, explicit_targs,
- arglist, return_type, access_path,
- conversion_path, flags, strict)
- struct z_candidate *candidates;
- tree tmpl, ctype, explicit_targs, arglist, return_type;
- tree access_path;
- tree conversion_path;
- int flags;
- unification_kind_t strict;
+add_template_candidate (struct z_candidate *candidates, tree tmpl, tree ctype,
+ tree explicit_targs, tree arglist, tree return_type,
+ tree access_path, tree conversion_path, int flags,
+ unification_kind_t strict)
{
return
add_template_candidate_real (candidates, tmpl, ctype,
static struct z_candidate *
-add_template_conv_candidate (candidates, tmpl, obj, arglist, return_type,
- access_path, conversion_path)
- struct z_candidate *candidates;
- tree tmpl, obj, arglist, return_type;
- tree access_path;
- tree conversion_path;
+add_template_conv_candidate (struct z_candidate *candidates, tree tmpl,
+ tree obj, tree arglist, tree return_type,
+ tree access_path, tree conversion_path)
{
return
add_template_candidate_real (candidates, tmpl, NULL_TREE, NULL_TREE,
}
-static int
-any_viable (cands)
- struct z_candidate *cands;
+static bool
+any_viable (struct z_candidate *cands)
{
for (; cands; cands = cands->next)
if (pedantic ? cands->viable == 1 : cands->viable)
- return 1;
- return 0;
+ return true;
+ return false;
}
-static int
-any_strictly_viable (cands)
- struct z_candidate *cands;
+static bool
+any_strictly_viable (struct z_candidate *cands)
{
for (; cands; cands = cands->next)
if (cands->viable == 1)
- return 1;
- return 0;
+ return true;
+ return false;
}
static struct z_candidate *
-splice_viable (cands)
- struct z_candidate *cands;
+splice_viable (struct z_candidate *cands)
{
struct z_candidate **p = &cands;
}
static tree
-build_this (obj)
- tree obj;
+build_this (tree obj)
{
/* Fix this to work on non-lvalues. */
return build_unary_op (ADDR_EXPR, obj, 0);
}
static void
-print_z_candidates (candidates)
- struct z_candidate *candidates;
+print_z_candidates (struct z_candidate *candidates)
{
const char *str = "candidates are:";
for (; candidates; candidates = candidates->next)
per [dcl.init.ref], so we ignore temporary bindings. */
static struct z_candidate *
-build_user_type_conversion_1 (totype, expr, flags)
- tree totype, expr;
- int flags;
+build_user_type_conversion_1 (tree totype, tree expr, int flags)
{
struct z_candidate *candidates, *cand;
tree fromtype = TREE_TYPE (expr);
}
tree
-build_user_type_conversion (totype, expr, flags)
- tree totype, expr;
- int flags;
+build_user_type_conversion (tree totype, tree expr, int flags)
{
struct z_candidate *cand
= build_user_type_conversion_1 (totype, expr, flags);
/* Do any initial processing on the arguments to a function call. */
static tree
-resolve_args (args)
- tree args;
+resolve_args (tree args)
{
tree t;
for (t = args; t; t = TREE_CHAIN (t))
with the ARGS. */
tree
-build_new_function_call (fn, args)
- tree fn, args;
+build_new_function_call (tree fn, tree args)
{
struct z_candidate *candidates = 0, *cand;
tree explicit_targs = NULL_TREE;
}
static tree
-build_object_call (obj, args)
- tree obj, args;
+build_object_call (tree obj, tree args)
{
struct z_candidate *candidates = 0, *cand;
tree fns, convs, mem_args = NULL_TREE;
}
static void
-op_error (code, code2, arg1, arg2, arg3, problem)
- enum tree_code code, code2;
- tree arg1, arg2, arg3;
- const char *problem;
+op_error (enum tree_code code, enum tree_code code2,
+ tree arg1, tree arg2, tree arg3, const char *problem)
{
const char *opname;
convert E1 to E2 in [expr.cond]. */
static tree
-conditional_conversion (e1, e2)
- tree e1;
- tree e2;
+conditional_conversion (tree e1, tree e2)
{
tree t1 = non_reference (TREE_TYPE (e1));
tree t2 = non_reference (TREE_TYPE (e2));
arguments to the conditional expression. */
tree
-build_conditional_expr (arg1, arg2, arg3)
- tree arg1;
- tree arg2;
- tree arg3;
+build_conditional_expr (tree arg1, tree arg2, tree arg3)
{
tree arg2_type;
tree arg3_type;
tree result;
tree result_type = NULL_TREE;
- int lvalue_p = 1;
+ bool lvalue_p = true;
struct z_candidate *candidates = 0;
struct z_candidate *cand;
return error_mark_node;
}
- lvalue_p = 0;
+ lvalue_p = false;
goto valid_operands;
}
/* [expr.cond]
cv-qualified) class type, overload resolution is used to
determine the conversions (if any) to be applied to the operands
(_over.match.oper_, _over.built_). */
- lvalue_p = 0;
+ lvalue_p = false;
if (!same_type_p (arg2_type, arg3_type)
&& (CLASS_TYPE_P (arg2_type) || CLASS_TYPE_P (arg3_type)))
{
}
tree
-build_new_op (code, flags, arg1, arg2, arg3)
- enum tree_code code;
- int flags;
- tree arg1, arg2, arg3;
+build_new_op (enum tree_code code, int flags, tree arg1, tree arg2, tree arg3)
{
struct z_candidate *candidates = 0, *cand;
tree fns, mem_arglist = NULL_TREE, arglist, fnname;
PLACEMENT is the corresponding placement new call, or NULL_TREE. */
tree
-build_op_delete_call (code, addr, size, flags, placement)
- enum tree_code code;
- tree addr, size, placement;
- int flags;
+build_op_delete_call (enum tree_code code, tree addr, tree size,
+ int flags, tree placement)
{
tree fn = NULL_TREE;
tree fns, fnname, fntype, argtypes, args, type;
BASETYPE_PATH, give an error. The most derived class in
BASETYPE_PATH is the one used to qualify DECL. */
-int
-enforce_access (basetype_path, decl)
- tree basetype_path;
- tree decl;
+bool
+enforce_access (tree basetype_path, tree decl)
{
- int accessible;
-
- accessible = accessible_p (basetype_path, decl);
- if (!accessible)
+ if (!accessible_p (basetype_path, decl))
{
if (TREE_PRIVATE (decl))
cp_error_at ("`%+#D' is private", decl);
else
cp_error_at ("`%+#D' is inaccessible", decl);
error ("within this context");
- return 0;
+ return false;
}
- return 1;
+ return true;
}
/* Perform the conversions in CONVS on the expression EXPR.
reference binding will be applied, positive otherwise. */
static tree
-convert_like_real (convs, expr, fn, argnum, inner)
- tree convs, expr;
- tree fn;
- int argnum;
- int inner;
+convert_like_real (tree convs, tree expr, tree fn, int argnum, int inner)
{
int savew, savee;
/* Build a call to __builtin_trap which can be used in an expression. */
static tree
-call_builtin_trap ()
+call_builtin_trap (void)
{
tree fn = get_identifier ("__builtin_trap");
if (IDENTIFIER_GLOBAL_VALUE (fn))
Return the converted value. */
tree
-convert_arg_to_ellipsis (arg)
- tree arg;
+convert_arg_to_ellipsis (tree arg)
{
if (TREE_CODE (TREE_TYPE (arg)) == REAL_TYPE
&& (TYPE_PRECISION (TREE_TYPE (arg))
/* va_arg (EXPR, TYPE) is a builtin. Make sure it is not abused. */
tree
-build_x_va_arg (expr, type)
- tree expr;
- tree type;
+build_x_va_arg (tree expr, tree type)
{
if (processing_template_decl)
return build_min (VA_ARG_EXPR, type, expr);
type, or the passed type if there is no change. */
tree
-cxx_type_promotes_to (type)
- tree type;
+cxx_type_promotes_to (tree type)
{
tree promote;
conversions. Return the converted value. */
tree
-convert_default_arg (type, arg, fn, parmnum)
- tree type;
- tree arg;
- tree fn;
- int parmnum;
+convert_default_arg (tree type, tree arg, tree fn, int parmnum)
{
if (TREE_CODE (arg) == DEFAULT_ARG)
{
type TYPE. */
tree
-type_passed_as (type)
- tree type;
+type_passed_as (tree type)
{
/* Pass classes with copy ctors by invisible reference. */
if (TREE_ADDRESSABLE (type))
/* Actually perform the appropriate conversion. */
tree
-convert_for_arg_passing (type, val)
- tree type, val;
+convert_for_arg_passing (tree type, tree val)
{
if (val == error_mark_node)
;
bitmask of various LOOKUP_* flags which apply to the call itself. */
static tree
-build_over_call (cand, args, flags)
- struct z_candidate *cand;
- tree args;
- int flags;
+build_over_call (struct z_candidate *cand, tree args, int flags)
{
tree fn = cand->fn;
tree convs = cand->convs;
_Jv_LookupInterfaceMethodIdx(). */
static tree
-build_java_interface_fn_ref (fn, instance)
- tree fn, instance;
+build_java_interface_fn_ref (tree fn, tree instance)
{
tree lookup_args, lookup_fn, method, idx;
tree klass_ref, iface, iface_ref;
call to a function with the indicated NAME. */
tree
-in_charge_arg_for_name (name)
- tree name;
+in_charge_arg_for_name (tree name)
{
if (name == base_ctor_identifier
|| name == base_dtor_identifier)
return call;
}
-/* Returns nonzero iff standard conversion sequence ICS1 is a proper
+/* Returns true iff standard conversion sequence ICS1 is a proper
subsequence of ICS2. */
-static int
-is_subseq (ics1, ics2)
- tree ics1, ics2;
+static bool
+is_subseq (tree ics1, tree ics2)
{
/* We can assume that a conversion of the same code
between the same types indicates a subsequence since we only get
ICS2. We can get a USER_CONV when we are comparing the
second standard conversion sequence of two user conversion
sequences. */
- return 0;
+ return false;
ics2 = TREE_OPERAND (ics2, 0);
&& same_type_p (TREE_TYPE (ics2), TREE_TYPE (ics1))
&& same_type_p (TREE_TYPE (TREE_OPERAND (ics2, 0)),
TREE_TYPE (TREE_OPERAND (ics1, 0))))
- return 1;
+ return true;
}
}
/* Returns nonzero iff DERIVED is derived from BASE. The inputs may
be any _TYPE nodes. */
-int
-is_properly_derived_from (derived, base)
- tree derived;
- tree base;
+bool
+is_properly_derived_from (tree derived, tree base)
{
if (!IS_AGGR_TYPE_CODE (TREE_CODE (derived))
|| !IS_AGGR_TYPE_CODE (TREE_CODE (base)))
- return 0;
+ return false;
/* We only allow proper derivation here. The DERIVED_FROM_P macro
considers every class derived from itself. */
modify it accordingly. */
static void
-maybe_handle_implicit_object (ics)
- tree* ics;
+maybe_handle_implicit_object (tree *ics)
{
if (ICS_THIS_FLAG (*ics))
{
leave *ICS unchanged and return NULL_TREE. */
static tree
-maybe_handle_ref_bind (ics)
- tree* ics;
+maybe_handle_ref_bind (tree *ics)
{
if (TREE_CODE (*ics) == REF_BIND)
{
0: ics1 and ics2 are indistinguishable */
static int
-compare_ics (ics1, ics2)
- tree ics1, ics2;
+compare_ics (tree ics1, tree ics2)
{
tree from_type1;
tree from_type2;
/* The source type for this standard conversion sequence. */
static tree
-source_type (t)
- tree t;
+source_type (tree t)
{
for (;; t = TREE_OPERAND (t, 0))
{
is actually used. */
static void
-add_warning (winner, loser)
- struct z_candidate *winner, *loser;
+add_warning (struct z_candidate *winner, struct z_candidate *loser)
{
winner->warnings = tree_cons (NULL_TREE,
build_zc_wrapper (loser),
both are extern "C". */
static inline int
-equal_functions (fn1, fn2)
- tree fn1;
- tree fn2;
+equal_functions (tree fn1, tree fn2)
{
if (DECL_LOCAL_FUNCTION_P (fn1) || DECL_LOCAL_FUNCTION_P (fn2)
|| DECL_EXTERN_C_FUNCTION_P (fn1))
0: cand1 and cand2 are indistinguishable */
static int
-joust (cand1, cand2, warn)
- struct z_candidate *cand1, *cand2;
- int warn;
+joust (struct z_candidate *cand1, struct z_candidate *cand2, bool warn)
{
int winner = 0;
int i, off1 = 0, off2 = 0, len;
algorithm. */
static struct z_candidate *
-tourney (candidates)
- struct z_candidate *candidates;
+tourney (struct z_candidate *candidates)
{
struct z_candidate *champ = candidates, *challenger;
int fate;
/* Returns nonzero if things of type FROM can be converted to TO. */
-int
-can_convert (to, from)
- tree to, from;
+bool
+can_convert (tree to, tree from)
{
return can_convert_arg (to, from, NULL_TREE);
}
/* Returns nonzero if ARG (of type FROM) can be converted to TO. */
-int
-can_convert_arg (to, from, arg)
- tree to, from, arg;
+bool
+can_convert_arg (tree to, tree from, tree arg)
{
tree t = implicit_conversion (to, from, arg, LOOKUP_NORMAL);
return (t && ! ICS_BAD_FLAG (t));
/* Like can_convert_arg, but allows dubious conversions as well. */
-int
-can_convert_arg_bad (to, from, arg)
- tree to, from, arg;
+bool
+can_convert_arg_bad (tree to, tree from, tree arg)
{
- tree t = implicit_conversion (to, from, arg, LOOKUP_NORMAL);
- return !!t;
+ return implicit_conversion (to, from, arg, LOOKUP_NORMAL) != 0;
}
/* Convert EXPR to TYPE. Return the converted expression.
doing a bad conversion, convert_like will complain. */
tree
-perform_implicit_conversion (type, expr)
- tree type;
- tree expr;
+perform_implicit_conversion (tree type, tree expr)
{
tree conv;
expression. */
tree
-initialize_reference (type, expr)
- tree type;
- tree expr;
+initialize_reference (tree type, tree expr)
{
tree conv;