parent
887a8bd9fa
commit
4dabb3791d
|
@ -1,3 +1,12 @@
|
||||||
|
Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
|
||||||
|
|
||||||
|
* cp-tree.h (build_overload_call_maybe): Removed.
|
||||||
|
* call.c (build_overload_call_real): Invert meaning of last arg to
|
||||||
|
be require_complete.
|
||||||
|
(build_overload_call): Ditto.
|
||||||
|
* typeck.c (build_x_function_call): Use build_overload_call_real
|
||||||
|
instead of build_overload_call_maybe.
|
||||||
|
|
||||||
Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
|
Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
|
||||||
|
|
||||||
* decl2.c (finish_file): Don't try to emit functions that haven't
|
* decl2.c (finish_file): Don't try to emit functions that haven't
|
||||||
|
|
|
@ -228,10 +228,10 @@ convert_harshness (type, parmtype, parm)
|
||||||
tree ttl = TYPE_METHOD_BASETYPE (type);
|
tree ttl = TYPE_METHOD_BASETYPE (type);
|
||||||
tree ttr = TYPE_METHOD_BASETYPE (parmtype);
|
tree ttr = TYPE_METHOD_BASETYPE (parmtype);
|
||||||
|
|
||||||
int b_or_d = get_base_distance (ttr, ttl, 0, 0);
|
int b_or_d = get_base_distance (ttr, ttl, 0, (tree*)0);
|
||||||
if (b_or_d < 0)
|
if (b_or_d < 0)
|
||||||
{
|
{
|
||||||
b_or_d = get_base_distance (ttl, ttr, 0, 0);
|
b_or_d = get_base_distance (ttl, ttr, 0, (tree*)0);
|
||||||
if (b_or_d < 0)
|
if (b_or_d < 0)
|
||||||
return EVIL_RETURN (h);
|
return EVIL_RETURN (h);
|
||||||
h.distance = -b_or_d;
|
h.distance = -b_or_d;
|
||||||
|
@ -361,10 +361,10 @@ convert_harshness (type, parmtype, parm)
|
||||||
h.code = 0;
|
h.code = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int b_or_d = get_base_distance (ttr, ttl, 0, 0);
|
int b_or_d = get_base_distance (ttr, ttl, 0, (tree*)0);
|
||||||
if (b_or_d < 0)
|
if (b_or_d < 0)
|
||||||
{
|
{
|
||||||
b_or_d = get_base_distance (ttl, ttr, 0, 0);
|
b_or_d = get_base_distance (ttl, ttr, 0, (tree*)0);
|
||||||
if (b_or_d < 0)
|
if (b_or_d < 0)
|
||||||
return EVIL_RETURN (h);
|
return EVIL_RETURN (h);
|
||||||
h.distance = -b_or_d;
|
h.distance = -b_or_d;
|
||||||
|
@ -551,10 +551,10 @@ convert_harshness (type, parmtype, parm)
|
||||||
|
|
||||||
if (TREE_CODE (ttl) == RECORD_TYPE && TREE_CODE (ttr) == RECORD_TYPE)
|
if (TREE_CODE (ttl) == RECORD_TYPE && TREE_CODE (ttr) == RECORD_TYPE)
|
||||||
{
|
{
|
||||||
int b_or_d = get_base_distance (ttl, ttr, 0, 0);
|
int b_or_d = get_base_distance (ttl, ttr, 0, (tree*)0);
|
||||||
if (b_or_d < 0)
|
if (b_or_d < 0)
|
||||||
{
|
{
|
||||||
b_or_d = get_base_distance (ttr, ttl, 0, 0);
|
b_or_d = get_base_distance (ttr, ttl, 0, (tree*)0);
|
||||||
if (b_or_d < 0)
|
if (b_or_d < 0)
|
||||||
return EVIL_RETURN (h);
|
return EVIL_RETURN (h);
|
||||||
h.distance = -b_or_d;
|
h.distance = -b_or_d;
|
||||||
|
@ -611,10 +611,10 @@ convert_harshness (type, parmtype, parm)
|
||||||
|
|
||||||
if (codel == RECORD_TYPE && coder == RECORD_TYPE)
|
if (codel == RECORD_TYPE && coder == RECORD_TYPE)
|
||||||
{
|
{
|
||||||
int b_or_d = get_base_distance (type, parmtype, 0, 0);
|
int b_or_d = get_base_distance (type, parmtype, 0, (tree*)0);
|
||||||
if (b_or_d < 0)
|
if (b_or_d < 0)
|
||||||
{
|
{
|
||||||
b_or_d = get_base_distance (parmtype, type, 0, 0);
|
b_or_d = get_base_distance (parmtype, type, 0, (tree*)0);
|
||||||
if (b_or_d < 0)
|
if (b_or_d < 0)
|
||||||
return EVIL_RETURN (h);
|
return EVIL_RETURN (h);
|
||||||
h.distance = -b_or_d;
|
h.distance = -b_or_d;
|
||||||
|
@ -1178,7 +1178,7 @@ build_vfield_ref (datum, type)
|
||||||
rval = build (COMPONENT_REF, TREE_TYPE (CLASSTYPE_VFIELD (type)),
|
rval = build (COMPONENT_REF, TREE_TYPE (CLASSTYPE_VFIELD (type)),
|
||||||
datum, CLASSTYPE_VFIELD (type));
|
datum, CLASSTYPE_VFIELD (type));
|
||||||
else
|
else
|
||||||
rval = build_component_ref (datum, DECL_NAME (CLASSTYPE_VFIELD (type)), 0, 0);
|
rval = build_component_ref (datum, DECL_NAME (CLASSTYPE_VFIELD (type)), NULL_TREE, 0);
|
||||||
flag_assume_nonnull_objects = old_assume_nonnull_objects;
|
flag_assume_nonnull_objects = old_assume_nonnull_objects;
|
||||||
|
|
||||||
return rval;
|
return rval;
|
||||||
|
@ -1431,7 +1431,7 @@ build_scoped_method_call (exp, basetype, name, parms)
|
||||||
name = build_min_nt (BIT_NOT_EXPR, type);
|
name = build_min_nt (BIT_NOT_EXPR, type);
|
||||||
}
|
}
|
||||||
name = build_min_nt (SCOPE_REF, basetype, name);
|
name = build_min_nt (SCOPE_REF, basetype, name);
|
||||||
return build_min_nt (METHOD_CALL_EXPR, name, exp, parms, 0);
|
return build_min_nt (METHOD_CALL_EXPR, name, exp, parms, NULL_TREE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TREE_CODE (type) == REFERENCE_TYPE)
|
if (TREE_CODE (type) == REFERENCE_TYPE)
|
||||||
|
@ -1604,7 +1604,7 @@ build_method_call (instance, name, parms, basetype_path, flags)
|
||||||
name = build_min_nt (BIT_NOT_EXPR, type);
|
name = build_min_nt (BIT_NOT_EXPR, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
return build_min_nt (METHOD_CALL_EXPR, name, instance, parms, 0);
|
return build_min_nt (METHOD_CALL_EXPR, name, instance, parms, NULL_TREE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is the logic that magically deletes the second argument to
|
/* This is the logic that magically deletes the second argument to
|
||||||
|
@ -2089,6 +2089,7 @@ build_method_call (instance, name, parms, basetype_path, flags)
|
||||||
alloca ((len + 1) * sizeof (struct harshness_code));
|
alloca ((len + 1) * sizeof (struct harshness_code));
|
||||||
|
|
||||||
result = build_overload_call (name, friend_parms, 0, cp);
|
result = build_overload_call (name, friend_parms, 0, cp);
|
||||||
|
|
||||||
/* If it turns out to be the one we were actually looking for
|
/* If it turns out to be the one we were actually looking for
|
||||||
(it was probably a friend function), the return the
|
(it was probably a friend function), the return the
|
||||||
good result. */
|
good result. */
|
||||||
|
@ -2577,11 +2578,11 @@ build_method_call (instance, name, parms, basetype_path, flags)
|
||||||
function's new name. */
|
function's new name. */
|
||||||
|
|
||||||
tree
|
tree
|
||||||
build_overload_call_real (fnname, parms, flags, final_cp, buildxxx)
|
build_overload_call_real (fnname, parms, flags, final_cp, require_complete)
|
||||||
tree fnname, parms;
|
tree fnname, parms;
|
||||||
int flags;
|
int flags;
|
||||||
struct candidate *final_cp;
|
struct candidate *final_cp;
|
||||||
int buildxxx;
|
int require_complete;
|
||||||
{
|
{
|
||||||
/* must check for overloading here */
|
/* must check for overloading here */
|
||||||
tree functions, function, parm;
|
tree functions, function, parm;
|
||||||
|
@ -2829,8 +2830,7 @@ build_overload_call_real (fnname, parms, flags, final_cp, buildxxx)
|
||||||
if (final_cp)
|
if (final_cp)
|
||||||
return rval;
|
return rval;
|
||||||
|
|
||||||
return buildxxx ? build_function_call_real (rval, parms, 0, flags)
|
return build_function_call_real (rval, parms, require_complete, flags);
|
||||||
: build_function_call_real (rval, parms, 1, flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & LOOKUP_SPECULATIVELY)
|
if (flags & LOOKUP_SPECULATIVELY)
|
||||||
|
@ -2843,20 +2843,12 @@ build_overload_call_real (fnname, parms, flags, final_cp, buildxxx)
|
||||||
return error_mark_node;
|
return error_mark_node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This requires a complete type on the result of the call. */
|
||||||
tree
|
tree
|
||||||
build_overload_call (fnname, parms, flags, final_cp)
|
build_overload_call (fnname, parms, flags, final_cp)
|
||||||
tree fnname, parms;
|
tree fnname, parms;
|
||||||
int flags;
|
int flags;
|
||||||
struct candidate *final_cp;
|
struct candidate *final_cp;
|
||||||
{
|
|
||||||
return build_overload_call_real (fnname, parms, flags, final_cp, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
tree
|
|
||||||
build_overload_call_maybe (fnname, parms, flags, final_cp)
|
|
||||||
tree fnname, parms;
|
|
||||||
int flags;
|
|
||||||
struct candidate *final_cp;
|
|
||||||
{
|
{
|
||||||
return build_overload_call_real (fnname, parms, flags, final_cp, 1);
|
return build_overload_call_real (fnname, parms, flags, final_cp, 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,7 +126,7 @@ build_vbase_pointer (exp, type)
|
||||||
|
|
||||||
name = (char *) alloca (TYPE_NAME_LENGTH (type) + sizeof (VBASE_NAME) + 1);
|
name = (char *) alloca (TYPE_NAME_LENGTH (type) + sizeof (VBASE_NAME) + 1);
|
||||||
sprintf (name, VBASE_NAME_FORMAT, TYPE_NAME_STRING (type));
|
sprintf (name, VBASE_NAME_FORMAT, TYPE_NAME_STRING (type));
|
||||||
return build_component_ref (exp, get_identifier (name), 0, 0);
|
return build_component_ref (exp, get_identifier (name), NULL_TREE, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Is the type of the EXPR, the complete type of the object?
|
/* Is the type of the EXPR, the complete type of the object?
|
||||||
|
|
|
@ -1282,8 +1282,8 @@ extern int flag_new_for_scope;
|
||||||
#define TYPE_GET_PTRMEMFUNC_TYPE(NODE) ((tree)TYPE_LANG_SPECIFIC(NODE))
|
#define TYPE_GET_PTRMEMFUNC_TYPE(NODE) ((tree)TYPE_LANG_SPECIFIC(NODE))
|
||||||
#define TYPE_SET_PTRMEMFUNC_TYPE(NODE, VALUE) (TYPE_LANG_SPECIFIC(NODE) = ((struct lang_type *)(void*)(VALUE)))
|
#define TYPE_SET_PTRMEMFUNC_TYPE(NODE, VALUE) (TYPE_LANG_SPECIFIC(NODE) = ((struct lang_type *)(void*)(VALUE)))
|
||||||
/* These are to get the delta2 and pfn fields from a TYPE_PTRMEMFUNC_P. */
|
/* These are to get the delta2 and pfn fields from a TYPE_PTRMEMFUNC_P. */
|
||||||
#define DELTA2_FROM_PTRMEMFUNC(NODE) (build_component_ref (build_component_ref ((NODE), pfn_or_delta2_identifier, 0, 0), delta2_identifier, 0, 0))
|
#define DELTA2_FROM_PTRMEMFUNC(NODE) (build_component_ref (build_component_ref ((NODE), pfn_or_delta2_identifier, NULL_TREE, 0), delta2_identifier, NULL_TREE, 0))
|
||||||
#define PFN_FROM_PTRMEMFUNC(NODE) (build_component_ref (build_component_ref ((NODE), pfn_or_delta2_identifier, 0, 0), pfn_identifier, 0, 0))
|
#define PFN_FROM_PTRMEMFUNC(NODE) (build_component_ref (build_component_ref ((NODE), pfn_or_delta2_identifier, NULL_TREE, 0), pfn_identifier, NULL_TREE, 0))
|
||||||
|
|
||||||
/* Nonzero for VAR_DECL and FUNCTION_DECL node means that `extern' was
|
/* Nonzero for VAR_DECL and FUNCTION_DECL node means that `extern' was
|
||||||
specified in its declaration. */
|
specified in its declaration. */
|
||||||
|
@ -1945,7 +1945,6 @@ extern tree build_scoped_method_call PROTO((tree, tree, tree, tree));
|
||||||
extern tree build_method_call PROTO((tree, tree, tree, tree, int));
|
extern tree build_method_call PROTO((tree, tree, tree, tree, int));
|
||||||
extern tree build_overload_call_real PROTO((tree, tree, int, struct candidate *, int));
|
extern tree build_overload_call_real PROTO((tree, tree, int, struct candidate *, int));
|
||||||
extern tree build_overload_call PROTO((tree, tree, int, struct candidate *));
|
extern tree build_overload_call PROTO((tree, tree, int, struct candidate *));
|
||||||
extern tree build_overload_call_maybe PROTO((tree, tree, int, struct candidate *));
|
|
||||||
|
|
||||||
/* in class.c */
|
/* in class.c */
|
||||||
extern tree build_vbase_pointer PROTO((tree, tree));
|
extern tree build_vbase_pointer PROTO((tree, tree));
|
||||||
|
|
|
@ -609,7 +609,7 @@ build_up_reference (type, arg, flags, checkconst)
|
||||||
use INDIRECT_BIND. */
|
use INDIRECT_BIND. */
|
||||||
tree slot = build (VAR_DECL, argtype);
|
tree slot = build (VAR_DECL, argtype);
|
||||||
layout_decl (slot, 0);
|
layout_decl (slot, 0);
|
||||||
rval = build (TARGET_EXPR, argtype, slot, arg, 0);
|
rval = build (TARGET_EXPR, argtype, slot, arg, NULL_TREE);
|
||||||
rval = build1 (ADDR_EXPR, type, rval);
|
rval = build1 (ADDR_EXPR, type, rval);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,7 +139,7 @@ cplus_expand_expr (exp, target, tmode, modifier)
|
||||||
call_target = validize_mem (call_target);
|
call_target = validize_mem (call_target);
|
||||||
}
|
}
|
||||||
|
|
||||||
call_exp = build (CALL_EXPR, type, func, args, 0);
|
call_exp = build (CALL_EXPR, type, func, args, NULL_TREE);
|
||||||
TREE_SIDE_EFFECTS (call_exp) = 1;
|
TREE_SIDE_EFFECTS (call_exp) = 1;
|
||||||
return_target = expand_call (call_exp, call_target, ignore);
|
return_target = expand_call (call_exp, call_target, ignore);
|
||||||
if (call_target == 0)
|
if (call_target == 0)
|
||||||
|
|
|
@ -682,6 +682,15 @@ appear in cp-decl.c and cp-decl2.c, so the are a good candidate for
|
||||||
proper fixing, and removal.
|
proper fixing, and removal.
|
||||||
|
|
||||||
|
|
||||||
|
@item TREE_HAS_CONSTRUCTOR
|
||||||
|
A flag to indicate when a CALL_EXPR represents a call to a constructor.
|
||||||
|
If set, we know that the type of the object, is the complete type of the
|
||||||
|
object, and that the value returned is nonnull. When used in this
|
||||||
|
fashion, it is an optimization. Can also be used on SAVE_EXPRs to
|
||||||
|
indicate when they are of fixed type and nonnull. Can also be used on
|
||||||
|
INDIRECT_EXPRs on CALL_EXPRs that represent a call to a constructor.
|
||||||
|
|
||||||
|
|
||||||
@item TREE_PRIVATE
|
@item TREE_PRIVATE
|
||||||
Set for FIELD_DECLs by finish_struct. But not uniformly set.
|
Set for FIELD_DECLs by finish_struct. But not uniformly set.
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,7 @@ perform_member_init (member, name, init, explicit, protect_list)
|
||||||
if (init != NULL_TREE && TREE_CODE (init) != TREE_LIST)
|
if (init != NULL_TREE && TREE_CODE (init) != TREE_LIST)
|
||||||
init = build_tree_list (NULL_TREE, init);
|
init = build_tree_list (NULL_TREE, init);
|
||||||
|
|
||||||
decl = build_component_ref (C_C_D, name, 0, explicit);
|
decl = build_component_ref (C_C_D, name, NULL_TREE, explicit);
|
||||||
|
|
||||||
if (explicit
|
if (explicit
|
||||||
&& TREE_CODE (type) == ARRAY_TYPE
|
&& TREE_CODE (type) == ARRAY_TYPE
|
||||||
|
@ -220,7 +220,7 @@ perform_member_init (member, name, init, explicit, protect_list)
|
||||||
current_member_init_list. */
|
current_member_init_list. */
|
||||||
if (init || explicit)
|
if (init || explicit)
|
||||||
{
|
{
|
||||||
decl = build_component_ref (C_C_D, name, 0, explicit);
|
decl = build_component_ref (C_C_D, name, NULL_TREE, explicit);
|
||||||
expand_expr_stmt (build_modify_expr (decl, INIT_EXPR, init));
|
expand_expr_stmt (build_modify_expr (decl, INIT_EXPR, init));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ perform_member_init (member, name, init, explicit, protect_list)
|
||||||
|
|
||||||
if (TYPE_NEEDS_DESTRUCTOR (type))
|
if (TYPE_NEEDS_DESTRUCTOR (type))
|
||||||
{
|
{
|
||||||
tree expr = build_component_ref (C_C_D, name, 0, explicit);
|
tree expr = build_component_ref (C_C_D, name, NULL_TREE, explicit);
|
||||||
expr = build_delete (type, expr, integer_zero_node,
|
expr = build_delete (type, expr, integer_zero_node,
|
||||||
LOOKUP_NONVIRTUAL|LOOKUP_DESTRUCTOR, 0);
|
LOOKUP_NONVIRTUAL|LOOKUP_DESTRUCTOR, 0);
|
||||||
|
|
||||||
|
@ -1071,7 +1071,7 @@ expand_member_init (exp, name, init)
|
||||||
TREE_USED (exp) = 1;
|
TREE_USED (exp) = 1;
|
||||||
}
|
}
|
||||||
type = TYPE_MAIN_VARIANT (TREE_TYPE (field));
|
type = TYPE_MAIN_VARIANT (TREE_TYPE (field));
|
||||||
parm = build_component_ref (exp, name, 0, 0);
|
parm = build_component_ref (exp, name, NULL_TREE, 0);
|
||||||
|
|
||||||
/* Now get to the constructors. */
|
/* Now get to the constructors. */
|
||||||
fndecl = TREE_VEC_ELT (CLASSTYPE_METHOD_VEC (type), 0);
|
fndecl = TREE_VEC_ELT (CLASSTYPE_METHOD_VEC (type), 0);
|
||||||
|
@ -1114,7 +1114,7 @@ expand_member_init (exp, name, init)
|
||||||
}
|
}
|
||||||
else if (TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (field)))
|
else if (TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (field)))
|
||||||
{
|
{
|
||||||
parm = build_component_ref (exp, name, 0, 0);
|
parm = build_component_ref (exp, name, NULL_TREE, 0);
|
||||||
expand_aggr_init (parm, NULL_TREE, 0, 0);
|
expand_aggr_init (parm, NULL_TREE, 0, 0);
|
||||||
rval = error_mark_node;
|
rval = error_mark_node;
|
||||||
}
|
}
|
||||||
|
@ -1457,7 +1457,7 @@ expand_aggr_init_1 (binfo, true_exp, exp, init, alias_this, flags)
|
||||||
tree arg = build_unary_op (ADDR_EXPR, exp, 0);
|
tree arg = build_unary_op (ADDR_EXPR, exp, 0);
|
||||||
init = TREE_OPERAND (init, 1);
|
init = TREE_OPERAND (init, 1);
|
||||||
init = build (CALL_EXPR, build_pointer_type (TREE_TYPE (init)),
|
init = build (CALL_EXPR, build_pointer_type (TREE_TYPE (init)),
|
||||||
TREE_OPERAND (init, 0), TREE_OPERAND (init, 1), 0);
|
TREE_OPERAND (init, 0), TREE_OPERAND (init, 1), NULL_TREE);
|
||||||
TREE_SIDE_EFFECTS (init) = 1;
|
TREE_SIDE_EFFECTS (init) = 1;
|
||||||
TREE_VALUE (TREE_OPERAND (init, 1))
|
TREE_VALUE (TREE_OPERAND (init, 1))
|
||||||
= convert_pointer_to (TREE_TYPE (TREE_TYPE (TREE_VALUE (tmp))), arg);
|
= convert_pointer_to (TREE_TYPE (TREE_TYPE (TREE_VALUE (tmp))), arg);
|
||||||
|
@ -2529,7 +2529,7 @@ build_builtin_call (type, node, arglist)
|
||||||
tree node;
|
tree node;
|
||||||
tree arglist;
|
tree arglist;
|
||||||
{
|
{
|
||||||
tree rval = build (CALL_EXPR, type, node, arglist, 0);
|
tree rval = build (CALL_EXPR, type, node, arglist, NULL_TREE);
|
||||||
TREE_SIDE_EFFECTS (rval) = 1;
|
TREE_SIDE_EFFECTS (rval) = 1;
|
||||||
assemble_external (TREE_OPERAND (node, 0));
|
assemble_external (TREE_OPERAND (node, 0));
|
||||||
TREE_USED (TREE_OPERAND (node, 0)) = 1;
|
TREE_USED (TREE_OPERAND (node, 0)) = 1;
|
||||||
|
@ -2842,7 +2842,7 @@ build_new (placement, decl, init, use_global_new)
|
||||||
cookie = build_indirect_ref (build (MINUS_EXPR, build_pointer_type (BI_header_type),
|
cookie = build_indirect_ref (build (MINUS_EXPR, build_pointer_type (BI_header_type),
|
||||||
rval, extra), NULL_PTR);
|
rval, extra), NULL_PTR);
|
||||||
exp1 = build (MODIFY_EXPR, void_type_node,
|
exp1 = build (MODIFY_EXPR, void_type_node,
|
||||||
build_component_ref (cookie, nc_nelts_field_id, 0, 0),
|
build_component_ref (cookie, nc_nelts_field_id, NULL_TREE, 0),
|
||||||
nelts);
|
nelts);
|
||||||
TREE_SIDE_EFFECTS (exp1) = 1;
|
TREE_SIDE_EFFECTS (exp1) = 1;
|
||||||
rval = convert (build_pointer_type (true_type), rval);
|
rval = convert (build_pointer_type (true_type), rval);
|
||||||
|
@ -3080,9 +3080,9 @@ build_vec_delete_1 (base, maxindex, type, auto_delete_vec, auto_delete,
|
||||||
base,
|
base,
|
||||||
virtual_size)));
|
virtual_size)));
|
||||||
DECL_REGISTER (tbase) = 1;
|
DECL_REGISTER (tbase) = 1;
|
||||||
controller = build (BIND_EXPR, void_type_node, tbase, 0, 0);
|
controller = build (BIND_EXPR, void_type_node, tbase, NULL_TREE, NULL_TREE);
|
||||||
TREE_SIDE_EFFECTS (controller) = 1;
|
TREE_SIDE_EFFECTS (controller) = 1;
|
||||||
block = build_block (tbase, 0, 0, 0, 0);
|
block = build_block (tbase, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE);
|
||||||
add_block_current_level (block);
|
add_block_current_level (block);
|
||||||
|
|
||||||
if (auto_delete != integer_zero_node
|
if (auto_delete != integer_zero_node
|
||||||
|
@ -3802,7 +3802,7 @@ build_delete (type, addr, auto_delete, flags, use_global_delete)
|
||||||
continue;
|
continue;
|
||||||
if (TYPE_NEEDS_DESTRUCTOR (TREE_TYPE (member)))
|
if (TYPE_NEEDS_DESTRUCTOR (TREE_TYPE (member)))
|
||||||
{
|
{
|
||||||
tree this_member = build_component_ref (ref, DECL_NAME (member), 0, 0);
|
tree this_member = build_component_ref (ref, DECL_NAME (member), NULL_TREE, 0);
|
||||||
tree this_type = TREE_TYPE (member);
|
tree this_type = TREE_TYPE (member);
|
||||||
expr = build_delete (this_type, this_member, integer_two_node, flags, 0);
|
expr = build_delete (this_type, this_member, integer_two_node, flags, 0);
|
||||||
exprstmt = tree_cons (NULL_TREE, expr, exprstmt);
|
exprstmt = tree_cons (NULL_TREE, expr, exprstmt);
|
||||||
|
@ -3884,7 +3884,7 @@ build_vec_delete (base, maxindex, auto_delete_vec, auto_delete,
|
||||||
tree cookie_addr = build (MINUS_EXPR, build_pointer_type (BI_header_type),
|
tree cookie_addr = build (MINUS_EXPR, build_pointer_type (BI_header_type),
|
||||||
base, BI_header_size);
|
base, BI_header_size);
|
||||||
tree cookie = build_indirect_ref (cookie_addr, NULL_PTR);
|
tree cookie = build_indirect_ref (cookie_addr, NULL_PTR);
|
||||||
maxindex = build_component_ref (cookie, nc_nelts_field_id, 0, 0);
|
maxindex = build_component_ref (cookie, nc_nelts_field_id, NULL_TREE, 0);
|
||||||
do
|
do
|
||||||
type = TREE_TYPE (type);
|
type = TREE_TYPE (type);
|
||||||
while (TREE_CODE (type) == ARRAY_TYPE);
|
while (TREE_CODE (type) == ARRAY_TYPE);
|
||||||
|
|
|
@ -1462,7 +1462,7 @@ build_opfncall (code, flags, xarg1, xarg2, arg3)
|
||||||
}
|
}
|
||||||
else if (code == COND_EXPR)
|
else if (code == COND_EXPR)
|
||||||
{
|
{
|
||||||
parms = tree_cons (0, xarg2, build_tree_list (NULL_TREE, arg3));
|
parms = tree_cons (NULL_TREE, xarg2, build_tree_list (NULL_TREE, arg3));
|
||||||
rval = build_method_call (xarg1, fnname, parms, NULL_TREE, flags);
|
rval = build_method_call (xarg1, fnname, parms, NULL_TREE, flags);
|
||||||
}
|
}
|
||||||
else if (code == METHOD_CALL_EXPR)
|
else if (code == METHOD_CALL_EXPR)
|
||||||
|
@ -1561,7 +1561,7 @@ hack_identifier (value, name)
|
||||||
this field was initialized by a base initializer,
|
this field was initialized by a base initializer,
|
||||||
we can emit an error message. */
|
we can emit an error message. */
|
||||||
TREE_USED (value) = 1;
|
TREE_USED (value) = 1;
|
||||||
value = build_component_ref (C_C_D, name, 0, 1);
|
value = build_component_ref (C_C_D, name, NULL_TREE, 1);
|
||||||
}
|
}
|
||||||
else if (really_overloaded_fn (value))
|
else if (really_overloaded_fn (value))
|
||||||
{
|
{
|
||||||
|
@ -1775,7 +1775,7 @@ build_component_type_expr (of, component, basetype_path, protect)
|
||||||
}
|
}
|
||||||
|
|
||||||
this_this = convert_pointer_to (TREE_TYPE (of), current_class_decl);
|
this_this = convert_pointer_to (TREE_TYPE (of), current_class_decl);
|
||||||
return build_component_ref (this_this, name, 0, protect);
|
return build_component_ref (this_this, name, NULL_TREE, protect);
|
||||||
}
|
}
|
||||||
else if (cname)
|
else if (cname)
|
||||||
return build_offset_ref (cname, name);
|
return build_offset_ref (cname, name);
|
||||||
|
|
|
@ -1494,13 +1494,13 @@ primary:
|
||||||
{ $$ = build_offset_ref (OP0 ($$), OP1 ($$)); }
|
{ $$ = build_offset_ref (OP0 ($$), OP1 ($$)); }
|
||||||
| overqualified_id '(' nonnull_exprlist ')'
|
| overqualified_id '(' nonnull_exprlist ')'
|
||||||
{ if (current_template_parms)
|
{ if (current_template_parms)
|
||||||
$$ = build_min_nt (CALL_EXPR, copy_to_permanent ($1), $3, 0);
|
$$ = build_min_nt (CALL_EXPR, copy_to_permanent ($1), $3, NULL_TREE);
|
||||||
else
|
else
|
||||||
$$ = build_member_call (OP0 ($$), OP1 ($$), $3); }
|
$$ = build_member_call (OP0 ($$), OP1 ($$), $3); }
|
||||||
| overqualified_id LEFT_RIGHT
|
| overqualified_id LEFT_RIGHT
|
||||||
{ if (current_template_parms)
|
{ if (current_template_parms)
|
||||||
$$ = build_min_nt (CALL_EXPR, copy_to_permanent ($1),
|
$$ = build_min_nt (CALL_EXPR, copy_to_permanent ($1),
|
||||||
NULL_TREE, 0);
|
NULL_TREE, NULL_TREE);
|
||||||
else
|
else
|
||||||
$$ = build_member_call (OP0 ($$), OP1 ($$), NULL_TREE); }
|
$$ = build_member_call (OP0 ($$), OP1 ($$), NULL_TREE); }
|
||||||
| object unqualified_id %prec UNARY
|
| object unqualified_id %prec UNARY
|
||||||
|
|
|
@ -1799,7 +1799,7 @@ tsubst (t, args, nargs, in_decl)
|
||||||
case CALL_EXPR:
|
case CALL_EXPR:
|
||||||
return build_parse_node
|
return build_parse_node
|
||||||
(CALL_EXPR, tsubst (TREE_OPERAND (t, 0), args, nargs, in_decl),
|
(CALL_EXPR, tsubst (TREE_OPERAND (t, 0), args, nargs, in_decl),
|
||||||
tsubst (TREE_OPERAND (t, 1), args, nargs, in_decl), 0);
|
tsubst (TREE_OPERAND (t, 1), args, nargs, in_decl), NULL_TREE);
|
||||||
|
|
||||||
case SCOPE_REF:
|
case SCOPE_REF:
|
||||||
return build_parse_node
|
return build_parse_node
|
||||||
|
|
|
@ -165,7 +165,7 @@ build_typeid (exp)
|
||||||
t = build_vfn_ref ((tree *) 0, exp, integer_zero_node);
|
t = build_vfn_ref ((tree *) 0, exp, integer_zero_node);
|
||||||
TREE_TYPE (t) = build_pointer_type (tinfo_fn_type);
|
TREE_TYPE (t) = build_pointer_type (tinfo_fn_type);
|
||||||
|
|
||||||
t = build (CALL_EXPR, TREE_TYPE (tinfo_fn_type), t, NULL_TREE, 0);
|
t = build (CALL_EXPR, TREE_TYPE (tinfo_fn_type), t, NULL_TREE, NULL_TREE);
|
||||||
TREE_SIDE_EFFECTS (t) = 1;
|
TREE_SIDE_EFFECTS (t) = 1;
|
||||||
return convert_from_reference (t);
|
return convert_from_reference (t);
|
||||||
}
|
}
|
||||||
|
@ -263,7 +263,7 @@ get_typeid_1 (type)
|
||||||
tree type;
|
tree type;
|
||||||
{
|
{
|
||||||
tree t = build (CALL_EXPR, TREE_TYPE (tinfo_fn_type),
|
tree t = build (CALL_EXPR, TREE_TYPE (tinfo_fn_type),
|
||||||
default_conversion (get_tinfo_fn (type)), NULL_TREE, 0);
|
default_conversion (get_tinfo_fn (type)), NULL_TREE, NULL_TREE);
|
||||||
TREE_SIDE_EFFECTS (t) = 1;
|
TREE_SIDE_EFFECTS (t) = 1;
|
||||||
return convert_from_reference (t);
|
return convert_from_reference (t);
|
||||||
}
|
}
|
||||||
|
@ -317,7 +317,7 @@ throw_bad_cast ()
|
||||||
|
|
||||||
pop_obstacks ();
|
pop_obstacks ();
|
||||||
|
|
||||||
d = build (CALL_EXPR, void_type_node, default_conversion (d), NULL_TREE, 0);
|
d = build (CALL_EXPR, void_type_node, default_conversion (d), NULL_TREE, NULL_TREE);
|
||||||
TREE_SIDE_EFFECTS (d) = 1;
|
TREE_SIDE_EFFECTS (d) = 1;
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
@ -526,7 +526,7 @@ build_dynamic_cast (type, expr)
|
||||||
}
|
}
|
||||||
|
|
||||||
result = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (dcast_fn)),
|
result = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (dcast_fn)),
|
||||||
decay_conversion (dcast_fn), elems, 0);
|
decay_conversion (dcast_fn), elems, NULL_TREE);
|
||||||
TREE_SIDE_EFFECTS (result) = 1;
|
TREE_SIDE_EFFECTS (result) = 1;
|
||||||
|
|
||||||
if (tc == REFERENCE_TYPE)
|
if (tc == REFERENCE_TYPE)
|
||||||
|
@ -611,7 +611,7 @@ expand_si_desc (tdecl, type)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)),
|
fn = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)),
|
||||||
decay_conversion (fn), elems, 0);
|
decay_conversion (fn), elems, NULL_TREE);
|
||||||
TREE_SIDE_EFFECTS (fn) = 1;
|
TREE_SIDE_EFFECTS (fn) = 1;
|
||||||
expand_expr_stmt (fn);
|
expand_expr_stmt (fn);
|
||||||
}
|
}
|
||||||
|
@ -791,7 +791,7 @@ expand_class_desc (tdecl, type)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)),
|
fn = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)),
|
||||||
decay_conversion (fn), elems, 0);
|
decay_conversion (fn), elems, NULL_TREE);
|
||||||
TREE_SIDE_EFFECTS (fn) = 1;
|
TREE_SIDE_EFFECTS (fn) = 1;
|
||||||
expand_expr_stmt (fn);
|
expand_expr_stmt (fn);
|
||||||
}
|
}
|
||||||
|
@ -839,7 +839,7 @@ expand_ptr_desc (tdecl, type)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)),
|
fn = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)),
|
||||||
decay_conversion (fn), elems, 0);
|
decay_conversion (fn), elems, NULL_TREE);
|
||||||
TREE_SIDE_EFFECTS (fn) = 1;
|
TREE_SIDE_EFFECTS (fn) = 1;
|
||||||
expand_expr_stmt (fn);
|
expand_expr_stmt (fn);
|
||||||
}
|
}
|
||||||
|
@ -890,7 +890,7 @@ expand_attr_desc (tdecl, type)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)),
|
fn = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)),
|
||||||
decay_conversion (fn), elems, 0);
|
decay_conversion (fn), elems, NULL_TREE);
|
||||||
TREE_SIDE_EFFECTS (fn) = 1;
|
TREE_SIDE_EFFECTS (fn) = 1;
|
||||||
expand_expr_stmt (fn);
|
expand_expr_stmt (fn);
|
||||||
}
|
}
|
||||||
|
@ -932,7 +932,7 @@ expand_generic_desc (tdecl, type, fnname)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)),
|
fn = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)),
|
||||||
decay_conversion (fn), elems, 0);
|
decay_conversion (fn), elems, NULL_TREE);
|
||||||
TREE_SIDE_EFFECTS (fn) = 1;
|
TREE_SIDE_EFFECTS (fn) = 1;
|
||||||
expand_expr_stmt (fn);
|
expand_expr_stmt (fn);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2785,8 +2785,8 @@ expand_upcast_fixups (binfo, addr, orig_addr, vbase, vbase_addr, t,
|
||||||
assemble_external (vtbl);
|
assemble_external (vtbl);
|
||||||
aref = build_array_ref (vtbl, idx);
|
aref = build_array_ref (vtbl, idx);
|
||||||
naref = build_array_ref (nvtbl, idx);
|
naref = build_array_ref (nvtbl, idx);
|
||||||
old_delta = build_component_ref (aref, delta_identifier, 0, 0);
|
old_delta = build_component_ref (aref, delta_identifier, NULL_TREE, 0);
|
||||||
new_delta = build_component_ref (naref, delta_identifier, 0, 0);
|
new_delta = build_component_ref (naref, delta_identifier, NULL_TREE, 0);
|
||||||
|
|
||||||
/* This is a upcast, so we have to add the offset for the
|
/* This is a upcast, so we have to add the offset for the
|
||||||
virtual base. */
|
virtual base. */
|
||||||
|
|
|
@ -981,7 +981,7 @@ build_signature_method_call (basetype, instance, function, parms)
|
||||||
if (flag_vtable_thunks)
|
if (flag_vtable_thunks)
|
||||||
vfn = aref;
|
vfn = aref;
|
||||||
else
|
else
|
||||||
vfn = build_component_ref (aref, pfn_identifier, 0, 0);
|
vfn = build_component_ref (aref, pfn_identifier, NULL_TREE, 0);
|
||||||
|
|
||||||
TREE_TYPE (vfn) = build_pointer_type (TREE_TYPE (function));
|
TREE_TYPE (vfn) = build_pointer_type (TREE_TYPE (function));
|
||||||
|
|
||||||
|
|
|
@ -220,7 +220,7 @@ build_cplus_new (type, init)
|
||||||
TREE_OPERAND (init, 0), TREE_OPERAND (init, 1), slot);
|
TREE_OPERAND (init, 0), TREE_OPERAND (init, 1), slot);
|
||||||
TREE_SIDE_EFFECTS (rval) = 1;
|
TREE_SIDE_EFFECTS (rval) = 1;
|
||||||
TREE_ADDRESSABLE (rval) = 1;
|
TREE_ADDRESSABLE (rval) = 1;
|
||||||
rval = build (TARGET_EXPR, type, slot, rval, 0);
|
rval = build (TARGET_EXPR, type, slot, rval, NULL_TREE);
|
||||||
TREE_SIDE_EFFECTS (rval) = 1;
|
TREE_SIDE_EFFECTS (rval) = 1;
|
||||||
TREE_ADDRESSABLE (rval) = 1;
|
TREE_ADDRESSABLE (rval) = 1;
|
||||||
|
|
||||||
|
|
|
@ -2242,12 +2242,11 @@ build_array_ref (array, idx)
|
||||||
In the second case, TREE_PURPOSE (function) is the function's
|
In the second case, TREE_PURPOSE (function) is the function's
|
||||||
name directly.
|
name directly.
|
||||||
|
|
||||||
DECL is the class instance variable, usually CURRENT_CLASS_DECL. */
|
DECL is the class instance variable, usually CURRENT_CLASS_DECL.
|
||||||
|
|
||||||
|
When calling a TEMPLATE_DECL, we don't require a complete return
|
||||||
|
type. */
|
||||||
|
|
||||||
/*
|
|
||||||
* [eichin:19911015.1726EST] actually return a possibly incomplete
|
|
||||||
* type
|
|
||||||
*/
|
|
||||||
tree
|
tree
|
||||||
build_x_function_call (function, params, decl)
|
build_x_function_call (function, params, decl)
|
||||||
tree function, params, decl;
|
tree function, params, decl;
|
||||||
|
@ -2259,7 +2258,7 @@ build_x_function_call (function, params, decl)
|
||||||
return error_mark_node;
|
return error_mark_node;
|
||||||
|
|
||||||
if (current_template_parms)
|
if (current_template_parms)
|
||||||
return build_min_nt (CALL_EXPR, function, params, 0);
|
return build_min_nt (CALL_EXPR, function, params, NULL_TREE);
|
||||||
|
|
||||||
type = TREE_TYPE (function);
|
type = TREE_TYPE (function);
|
||||||
|
|
||||||
|
@ -2373,8 +2372,8 @@ build_x_function_call (function, params, decl)
|
||||||
tree val = TREE_VALUE (function);
|
tree val = TREE_VALUE (function);
|
||||||
|
|
||||||
if (TREE_CODE (val) == TEMPLATE_DECL)
|
if (TREE_CODE (val) == TEMPLATE_DECL)
|
||||||
return build_overload_call_maybe
|
return build_overload_call_real
|
||||||
(function, params, LOOKUP_COMPLAIN, (struct candidate *)0);
|
(function, params, LOOKUP_COMPLAIN, (struct candidate *)0, 0);
|
||||||
else if (DECL_CHAIN (val) != NULL_TREE)
|
else if (DECL_CHAIN (val) != NULL_TREE)
|
||||||
return build_overload_call
|
return build_overload_call
|
||||||
(function, params, LOOKUP_COMPLAIN, (struct candidate *)0);
|
(function, params, LOOKUP_COMPLAIN, (struct candidate *)0);
|
||||||
|
@ -2484,11 +2483,11 @@ get_member_function_from_ptrfunc (instance_ptrptr, function)
|
||||||
fntype = TYPE_PTRMEMFUNC_FN_TYPE (TREE_TYPE (function));
|
fntype = TYPE_PTRMEMFUNC_FN_TYPE (TREE_TYPE (function));
|
||||||
index = save_expr (build_component_ref (function,
|
index = save_expr (build_component_ref (function,
|
||||||
index_identifier,
|
index_identifier,
|
||||||
0, 0));
|
NULL_TREE, 0));
|
||||||
e1 = build (GT_EXPR, boolean_type_node, index,
|
e1 = build (GT_EXPR, boolean_type_node, index,
|
||||||
convert (delta_type_node, integer_zero_node));
|
convert (delta_type_node, integer_zero_node));
|
||||||
delta = convert (ptrdiff_type_node,
|
delta = convert (ptrdiff_type_node,
|
||||||
build_component_ref (function, delta_identifier, 0, 0));
|
build_component_ref (function, delta_identifier, NULL_TREE, 0));
|
||||||
delta2 = DELTA2_FROM_PTRMEMFUNC (function);
|
delta2 = DELTA2_FROM_PTRMEMFUNC (function);
|
||||||
|
|
||||||
/* convert down to the right base, before using the instance. */
|
/* convert down to the right base, before using the instance. */
|
||||||
|
@ -2512,7 +2511,7 @@ get_member_function_from_ptrfunc (instance_ptrptr, function)
|
||||||
aref = save_expr (aref);
|
aref = save_expr (aref);
|
||||||
|
|
||||||
delta = build_binary_op (PLUS_EXPR,
|
delta = build_binary_op (PLUS_EXPR,
|
||||||
build_conditional_expr (e1, build_component_ref (aref, delta_identifier, 0, 0), integer_zero_node),
|
build_conditional_expr (e1, build_component_ref (aref, delta_identifier, NULL_TREE, 0), integer_zero_node),
|
||||||
delta, 1);
|
delta, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2521,7 +2520,7 @@ get_member_function_from_ptrfunc (instance_ptrptr, function)
|
||||||
if (flag_vtable_thunks)
|
if (flag_vtable_thunks)
|
||||||
e2 = aref;
|
e2 = aref;
|
||||||
else
|
else
|
||||||
e2 = build_component_ref (aref, pfn_identifier, 0, 0);
|
e2 = build_component_ref (aref, pfn_identifier, NULL_TREE, 0);
|
||||||
|
|
||||||
e3 = PFN_FROM_PTRMEMFUNC (function);
|
e3 = PFN_FROM_PTRMEMFUNC (function);
|
||||||
TREE_TYPE (e2) = TREE_TYPE (e3);
|
TREE_TYPE (e2) = TREE_TYPE (e3);
|
||||||
|
@ -3365,14 +3364,14 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, error_code)
|
||||||
else if (TYPE_PTRMEMFUNC_P (type0) && TREE_CODE (op1) == INTEGER_CST
|
else if (TYPE_PTRMEMFUNC_P (type0) && TREE_CODE (op1) == INTEGER_CST
|
||||||
&& integer_zerop (op1))
|
&& integer_zerop (op1))
|
||||||
{
|
{
|
||||||
op0 = build_component_ref (op0, index_identifier, 0, 0);
|
op0 = build_component_ref (op0, index_identifier, NULL_TREE, 0);
|
||||||
op1 = integer_zero_node;
|
op1 = integer_zero_node;
|
||||||
result_type = TREE_TYPE (op0);
|
result_type = TREE_TYPE (op0);
|
||||||
}
|
}
|
||||||
else if (TYPE_PTRMEMFUNC_P (type1) && TREE_CODE (op0) == INTEGER_CST
|
else if (TYPE_PTRMEMFUNC_P (type1) && TREE_CODE (op0) == INTEGER_CST
|
||||||
&& integer_zerop (op0))
|
&& integer_zerop (op0))
|
||||||
{
|
{
|
||||||
op0 = build_component_ref (op1, index_identifier, 0, 0);
|
op0 = build_component_ref (op1, index_identifier, NULL_TREE, 0);
|
||||||
op1 = integer_zero_node;
|
op1 = integer_zero_node;
|
||||||
result_type = TREE_TYPE (op0);
|
result_type = TREE_TYPE (op0);
|
||||||
}
|
}
|
||||||
|
@ -3386,8 +3385,8 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, error_code)
|
||||||
&& ((op1.index != -1 && op0.delta2 == op1.delta2)
|
&& ((op1.index != -1 && op0.delta2 == op1.delta2)
|
||||||
|| op0.pfn == op1.pfn)) */
|
|| op0.pfn == op1.pfn)) */
|
||||||
|
|
||||||
tree index0 = build_component_ref (op0, index_identifier, 0, 0);
|
tree index0 = build_component_ref (op0, index_identifier, NULL_TREE, 0);
|
||||||
tree index1 = save_expr (build_component_ref (op1, index_identifier, 0, 0));
|
tree index1 = save_expr (build_component_ref (op1, index_identifier, NULL_TREE, 0));
|
||||||
tree pfn0 = PFN_FROM_PTRMEMFUNC (op0);
|
tree pfn0 = PFN_FROM_PTRMEMFUNC (op0);
|
||||||
tree pfn1 = PFN_FROM_PTRMEMFUNC (op1);
|
tree pfn1 = PFN_FROM_PTRMEMFUNC (op1);
|
||||||
tree delta20 = DELTA2_FROM_PTRMEMFUNC (op0);
|
tree delta20 = DELTA2_FROM_PTRMEMFUNC (op0);
|
||||||
|
@ -3408,7 +3407,7 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, error_code)
|
||||||
else if (TYPE_PTRMEMFUNC_P (type0)
|
else if (TYPE_PTRMEMFUNC_P (type0)
|
||||||
&& TYPE_PTRMEMFUNC_FN_TYPE (type0) == type1)
|
&& TYPE_PTRMEMFUNC_FN_TYPE (type0) == type1)
|
||||||
{
|
{
|
||||||
tree index0 = build_component_ref (op0, index_identifier, 0, 0);
|
tree index0 = build_component_ref (op0, index_identifier, NULL_TREE, 0);
|
||||||
tree index1;
|
tree index1;
|
||||||
tree pfn0 = PFN_FROM_PTRMEMFUNC (op0);
|
tree pfn0 = PFN_FROM_PTRMEMFUNC (op0);
|
||||||
tree delta20 = DELTA2_FROM_PTRMEMFUNC (op0);
|
tree delta20 = DELTA2_FROM_PTRMEMFUNC (op0);
|
||||||
|
@ -5909,7 +5908,7 @@ build_x_modify_expr (lhs, modifycode, rhs)
|
||||||
{
|
{
|
||||||
if (current_template_parms)
|
if (current_template_parms)
|
||||||
return build_min_nt (MODOP_EXPR, lhs,
|
return build_min_nt (MODOP_EXPR, lhs,
|
||||||
build_min_nt (modifycode, 0, 0), rhs);
|
build_min_nt (modifycode, NULL_TREE, NULL_TREE), rhs);
|
||||||
|
|
||||||
if (modifycode != NOP_EXPR)
|
if (modifycode != NOP_EXPR)
|
||||||
{
|
{
|
||||||
|
@ -6024,9 +6023,9 @@ build_ptrmemfunc (type, pfn, force)
|
||||||
if (TREE_CODE (pfn) != CONSTRUCTOR)
|
if (TREE_CODE (pfn) != CONSTRUCTOR)
|
||||||
{
|
{
|
||||||
tree e1, e2, e3;
|
tree e1, e2, e3;
|
||||||
ndelta = convert (ptrdiff_type_node, build_component_ref (pfn, delta_identifier, 0, 0));
|
ndelta = convert (ptrdiff_type_node, build_component_ref (pfn, delta_identifier, NULL_TREE, 0));
|
||||||
ndelta2 = convert (ptrdiff_type_node, DELTA2_FROM_PTRMEMFUNC (pfn));
|
ndelta2 = convert (ptrdiff_type_node, DELTA2_FROM_PTRMEMFUNC (pfn));
|
||||||
index = build_component_ref (pfn, index_identifier, 0, 0);
|
index = build_component_ref (pfn, index_identifier, NULL_TREE, 0);
|
||||||
delta = get_delta_difference (TYPE_METHOD_BASETYPE (TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (TREE_TYPE (pfn)))),
|
delta = get_delta_difference (TYPE_METHOD_BASETYPE (TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (TREE_TYPE (pfn)))),
|
||||||
TYPE_METHOD_BASETYPE (TREE_TYPE (type)),
|
TYPE_METHOD_BASETYPE (TREE_TYPE (type)),
|
||||||
force);
|
force);
|
||||||
|
@ -6034,20 +6033,20 @@ build_ptrmemfunc (type, pfn, force)
|
||||||
delta2 = build_binary_op (PLUS_EXPR, ndelta2, delta2, 1);
|
delta2 = build_binary_op (PLUS_EXPR, ndelta2, delta2, 1);
|
||||||
e1 = fold (build (GT_EXPR, boolean_type_node, index, integer_zero_node));
|
e1 = fold (build (GT_EXPR, boolean_type_node, index, integer_zero_node));
|
||||||
|
|
||||||
u = build_nt (CONSTRUCTOR, 0, tree_cons (delta2_identifier, delta2, NULL_TREE));
|
u = build_nt (CONSTRUCTOR, NULL_TREE, tree_cons (delta2_identifier, delta2, NULL_TREE));
|
||||||
u = build_nt (CONSTRUCTOR, 0, tree_cons (NULL_TREE, delta,
|
u = build_nt (CONSTRUCTOR, NULL_TREE, tree_cons (NULL_TREE, delta,
|
||||||
tree_cons (NULL_TREE, index,
|
tree_cons (NULL_TREE, index,
|
||||||
tree_cons (NULL_TREE, u, NULL_TREE))));
|
tree_cons (NULL_TREE, u, NULL_TREE))));
|
||||||
e2 = digest_init (TYPE_GET_PTRMEMFUNC_TYPE (type), u, (tree*)0);
|
e2 = digest_init (TYPE_GET_PTRMEMFUNC_TYPE (type), u, (tree*)0);
|
||||||
|
|
||||||
pfn = PFN_FROM_PTRMEMFUNC (pfn);
|
pfn = PFN_FROM_PTRMEMFUNC (pfn);
|
||||||
npfn = build1 (NOP_EXPR, type, pfn);
|
npfn = build1 (NOP_EXPR, type, pfn);
|
||||||
TREE_CONSTANT (npfn) = TREE_CONSTANT (pfn);
|
TREE_CONSTANT (npfn) = TREE_CONSTANT (pfn);
|
||||||
|
|
||||||
u = build_nt (CONSTRUCTOR, 0, tree_cons (pfn_identifier, npfn, NULL_TREE));
|
u = build_nt (CONSTRUCTOR, NULL_TREE, tree_cons (pfn_identifier, npfn, NULL_TREE));
|
||||||
u = build_nt (CONSTRUCTOR, 0, tree_cons (NULL_TREE, delta,
|
u = build_nt (CONSTRUCTOR, NULL_TREE, tree_cons (NULL_TREE, delta,
|
||||||
tree_cons (NULL_TREE, index,
|
tree_cons (NULL_TREE, index,
|
||||||
tree_cons (NULL_TREE, u, NULL_TREE))));
|
tree_cons (NULL_TREE, u, NULL_TREE))));
|
||||||
e3 = digest_init (TYPE_GET_PTRMEMFUNC_TYPE (type), u, (tree*)0);
|
e3 = digest_init (TYPE_GET_PTRMEMFUNC_TYPE (type), u, (tree*)0);
|
||||||
return build_conditional_expr (e1, e2, e3);
|
return build_conditional_expr (e1, e2, e3);
|
||||||
}
|
}
|
||||||
|
@ -6068,10 +6067,10 @@ build_ptrmemfunc (type, pfn, force)
|
||||||
pfn = build1 (NOP_EXPR, type, npfn);
|
pfn = build1 (NOP_EXPR, type, npfn);
|
||||||
TREE_CONSTANT (pfn) = TREE_CONSTANT (npfn);
|
TREE_CONSTANT (pfn) = TREE_CONSTANT (npfn);
|
||||||
|
|
||||||
u = build_nt (CONSTRUCTOR, 0, tree_cons (pfn_identifier, pfn, NULL_TREE));
|
u = build_nt (CONSTRUCTOR, NULL_TREE, tree_cons (pfn_identifier, pfn, NULL_TREE));
|
||||||
u = build_nt (CONSTRUCTOR, 0, tree_cons (NULL_TREE, delta,
|
u = build_nt (CONSTRUCTOR, NULL_TREE, tree_cons (NULL_TREE, delta,
|
||||||
tree_cons (NULL_TREE, nindex,
|
tree_cons (NULL_TREE, nindex,
|
||||||
tree_cons (NULL_TREE, u, NULL_TREE))));
|
tree_cons (NULL_TREE, u, NULL_TREE))));
|
||||||
e3 = digest_init (TYPE_GET_PTRMEMFUNC_TYPE (type), u, (tree*)0);
|
e3 = digest_init (TYPE_GET_PTRMEMFUNC_TYPE (type), u, (tree*)0);
|
||||||
return e3;
|
return e3;
|
||||||
}
|
}
|
||||||
|
@ -6086,10 +6085,10 @@ build_ptrmemfunc (type, pfn, force)
|
||||||
if (integer_zerop (pfn))
|
if (integer_zerop (pfn))
|
||||||
{
|
{
|
||||||
pfn = build_c_cast (type, integer_zero_node, 0);
|
pfn = build_c_cast (type, integer_zero_node, 0);
|
||||||
u = build_nt (CONSTRUCTOR, 0, tree_cons (pfn_identifier, pfn, NULL_TREE));
|
u = build_nt (CONSTRUCTOR, NULL_TREE, tree_cons (pfn_identifier, pfn, NULL_TREE));
|
||||||
u = build_nt (CONSTRUCTOR, 0, tree_cons (NULL_TREE, integer_zero_node,
|
u = build_nt (CONSTRUCTOR, NULL_TREE, tree_cons (NULL_TREE, integer_zero_node,
|
||||||
tree_cons (NULL_TREE, integer_zero_node,
|
tree_cons (NULL_TREE, integer_zero_node,
|
||||||
tree_cons (NULL_TREE, u, NULL_TREE))));
|
tree_cons (NULL_TREE, u, NULL_TREE))));
|
||||||
return digest_init (TYPE_GET_PTRMEMFUNC_TYPE (type), u, (tree*)0);
|
return digest_init (TYPE_GET_PTRMEMFUNC_TYPE (type), u, (tree*)0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6127,21 +6126,28 @@ build_ptrmemfunc (type, pfn, force)
|
||||||
index = size_binop (PLUS_EXPR,
|
index = size_binop (PLUS_EXPR,
|
||||||
DECL_VINDEX (TREE_OPERAND (pfn, 0)),
|
DECL_VINDEX (TREE_OPERAND (pfn, 0)),
|
||||||
integer_one_node);
|
integer_one_node);
|
||||||
u = build_nt (CONSTRUCTOR, 0, tree_cons (delta2_identifier, delta2, NULL_TREE));
|
u = build_nt (CONSTRUCTOR, NULL_TREE, tree_cons (delta2_identifier, delta2, NULL_TREE));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
index = size_binop (MINUS_EXPR, integer_zero_node, integer_one_node);
|
index = size_binop (MINUS_EXPR, integer_zero_node, integer_one_node);
|
||||||
|
|
||||||
npfn = build1 (NOP_EXPR, type, pfn);
|
if (type == TREE_TYPE (pfn))
|
||||||
TREE_CONSTANT (npfn) = TREE_CONSTANT (pfn);
|
{
|
||||||
|
npfn = pfn;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
npfn = build1 (NOP_EXPR, type, pfn);
|
||||||
|
TREE_CONSTANT (npfn) = TREE_CONSTANT (pfn);
|
||||||
|
}
|
||||||
|
|
||||||
u = build_nt (CONSTRUCTOR, 0, tree_cons (pfn_identifier, npfn, NULL_TREE));
|
u = build_nt (CONSTRUCTOR, NULL_TREE, tree_cons (pfn_identifier, npfn, NULL_TREE));
|
||||||
}
|
}
|
||||||
|
|
||||||
u = build_nt (CONSTRUCTOR, 0, tree_cons (NULL_TREE, delta,
|
u = build_nt (CONSTRUCTOR, NULL_TREE, tree_cons (NULL_TREE, delta,
|
||||||
tree_cons (NULL_TREE, index,
|
tree_cons (NULL_TREE, index,
|
||||||
tree_cons (NULL_TREE, u, NULL_TREE))));
|
tree_cons (NULL_TREE, u, NULL_TREE))));
|
||||||
return digest_init (TYPE_GET_PTRMEMFUNC_TYPE (type), u, (tree*)0);
|
return digest_init (TYPE_GET_PTRMEMFUNC_TYPE (type), u, (tree*)0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -873,11 +873,11 @@ digest_init (type, init, tail)
|
||||||
else if (flag_traditional)
|
else if (flag_traditional)
|
||||||
/* Traditionally one can say `char x[100] = 0;'. */
|
/* Traditionally one can say `char x[100] = 0;'. */
|
||||||
return process_init_constructor (type,
|
return process_init_constructor (type,
|
||||||
build_nt (CONSTRUCTOR, 0,
|
build_nt (CONSTRUCTOR, NULL_TREE,
|
||||||
tree_cons (0, init, 0)),
|
tree_cons (NULL_TREE, init, NULL_TREE)),
|
||||||
0);
|
(tree*)0);
|
||||||
if (code != ARRAY_TYPE)
|
if (code != ARRAY_TYPE)
|
||||||
return convert_for_initialization (0, type, init, LOOKUP_NORMAL,
|
return convert_for_initialization (NULL_TREE, type, init, LOOKUP_NORMAL,
|
||||||
"initialization", NULL_TREE, 0);
|
"initialization", NULL_TREE, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue