Index: gcc/builtins.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/builtins.c,v retrieving revision 1.256 diff -u -d -p -r1.256 builtins.c --- gcc/builtins.c 7 Oct 2003 02:23:36 -0000 1.256 +++ gcc/builtins.c 12 Oct 2003 15:37:30 -0000 @@ -6486,8 +6486,7 @@ build_function_call_expr (tree fn, tree tree call_expr; call_expr = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (fn)), fn); - call_expr = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)), - call_expr, arglist); + call_expr = build_call_expr (TREE_TYPE (TREE_TYPE (fn)), call_expr, arglist); return fold (call_expr); } Index: gcc/c-common.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/c-common.h,v retrieving revision 1.210 diff -u -d -p -r1.210 c-common.h --- gcc/c-common.h 28 Sep 2003 19:09:48 -0000 1.210 +++ gcc/c-common.h 12 Oct 2003 15:37:30 -0000 @@ -880,8 +880,11 @@ extern int skip_evaluation; (!C_TYPE_FUNCTION_P (type)) /* Record in each node resulting from a binary operator - what operator was specified for it. */ -#define C_EXP_ORIGINAL_CODE(exp) ((enum tree_code) TREE_COMPLEXITY (exp)) + what operator was specified for it. + The complexity of a CALL_EXPR is used as line number. */ +#define C_EXP_ORIGINAL_CODE(exp) \ + ((TREE_CODE (exp) == CALL_EXPR) ? ERROR_MARK \ + : (enum tree_code) TREE_COMPLEXITY (exp)) /* Attribute table common to the C front ends. */ extern const struct attribute_spec c_common_attribute_table[]; Index: gcc/c-objc-common.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/c-objc-common.c,v retrieving revision 1.35 diff -u -d -p -r1.35 c-objc-common.c --- gcc/c-objc-common.c 21 Sep 2003 05:07:09 -0000 1.35 +++ gcc/c-objc-common.c 12 Oct 2003 15:37:30 -0000 @@ -194,9 +194,9 @@ start_cdtor (int method_type) tree body; start_function (void_list_node_1, - build_nt (CALL_EXPR, fnname, - tree_cons (NULL_TREE, NULL_TREE, void_list_node_1), - NULL_TREE), + build_call_expr_nt (fnname, + tree_cons (NULL_TREE, NULL_TREE, + void_list_node_1)), NULL_TREE); store_parm_decls (); Index: gcc/c-parse.in =================================================================== RCS file: /cvs/gcc/gcc/gcc/c-parse.in,v retrieving revision 1.186 diff -u -d -p -r1.186 c-parse.in --- gcc/c-parse.in 2 Oct 2003 00:07:42 -0000 1.186 +++ gcc/c-parse.in 12 Oct 2003 15:37:30 -0000 @@ -1627,9 +1627,9 @@ after_type_declarator: '(' maybe_attribute after_type_declarator ')' { $$ = $2 ? tree_cons ($2, $3, NULL_TREE) : $3; } | after_type_declarator '(' parmlist_or_identifiers %prec '.' - { $$ = build_nt (CALL_EXPR, $1, $3, NULL_TREE); } + { $$ = build_call_expr_nt ($1, $3); } /* | after_type_declarator '(' error ')' %prec '.' - { $$ = build_nt (CALL_EXPR, $1, NULL_TREE, NULL_TREE); + { $$ = build_call_expr_nt ($1, NULL_TREE); poplevel (0, 0, 0); } */ | after_type_declarator array_declarator %prec '.' { $$ = set_array_declarator_type ($2, $1, 0); } @@ -1652,9 +1652,9 @@ parm_declarator: parm_declarator_starttypename: parm_declarator_starttypename '(' parmlist_or_identifiers %prec '.' - { $$ = build_nt (CALL_EXPR, $1, $3, NULL_TREE); } + { $$ = build_call_expr_nt ($1, $3); } /* | parm_declarator_starttypename '(' error ')' %prec '.' - { $$ = build_nt (CALL_EXPR, $1, NULL_TREE, NULL_TREE); + { $$ = build_call_expr_nt ($1, NULL_TREE); poplevel (0, 0, 0); } */ | parm_declarator_starttypename array_declarator %prec '.' { $$ = set_array_declarator_type ($2, $1, 0); } @@ -1666,9 +1666,9 @@ parm_declarator_starttypename: parm_declarator_nostarttypename: parm_declarator_nostarttypename '(' parmlist_or_identifiers %prec '.' - { $$ = build_nt (CALL_EXPR, $1, $3, NULL_TREE); } + { $$ = build_call_expr_nt ($1, $3); } /* | parm_declarator_nostarttypename '(' error ')' %prec '.' - { $$ = build_nt (CALL_EXPR, $1, NULL_TREE, NULL_TREE); + { $$ = build_call_expr_nt ($1, NULL_TREE); poplevel (0, 0, 0); } */ | parm_declarator_nostarttypename array_declarator %prec '.' { $$ = set_array_declarator_type ($2, $1, 0); } @@ -1685,9 +1685,9 @@ parm_declarator_nostarttypename: notype_declarator: notype_declarator '(' parmlist_or_identifiers %prec '.' - { $$ = build_nt (CALL_EXPR, $1, $3, NULL_TREE); } + { $$ = build_call_expr_nt ($1, $3); } /* | notype_declarator '(' error ')' %prec '.' - { $$ = build_nt (CALL_EXPR, $1, NULL_TREE, NULL_TREE); + { $$ = build_call_expr_nt ($1, NULL_TREE); poplevel (0, 0, 0); } */ | '(' maybe_attribute notype_declarator ')' { $$ = $2 ? tree_cons ($2, $3, NULL_TREE) : $3; } @@ -1961,11 +1961,11 @@ direct_absdcl1: '(' maybe_attribute absdcl1 ')' { $$ = $2 ? tree_cons ($2, $3, NULL_TREE) : $3; } | direct_absdcl1 '(' parmlist - { $$ = build_nt (CALL_EXPR, $1, $3, NULL_TREE); } + { $$ = build_call_expr_nt ($1, $3); } | direct_absdcl1 array_declarator { $$ = set_array_declarator_type ($2, $1, 1); } | '(' parmlist - { $$ = build_nt (CALL_EXPR, NULL_TREE, $2, NULL_TREE); } + { $$ = build_call_expr_nt (NULL_TREE, $2); } | array_declarator { $$ = set_array_declarator_type ($1, NULL_TREE, 1); } ; Index: gcc/c-typeck.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/c-typeck.c,v retrieving revision 1.260 diff -u -d -p -r1.260 c-typeck.c --- gcc/c-typeck.c 4 Oct 2003 18:02:31 -0000 1.260 +++ gcc/c-typeck.c 12 Oct 2003 15:37:35 -0000 @@ -1708,8 +1708,7 @@ build_function_call (tree function, tree return result; } - result = build (CALL_EXPR, TREE_TYPE (fntype), - function, coerced_params, NULL_TREE); + result = build_call_expr (TREE_TYPE (fntype), function, coerced_params); TREE_SIDE_EFFECTS (result) = 1; result = fold (result); Index: gcc/calls.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/calls.c,v retrieving revision 1.304 diff -u -d -p -r1.304 calls.c --- gcc/calls.c 7 Oct 2003 19:48:17 -0000 1.304 +++ gcc/calls.c 12 Oct 2003 15:37:42 -0000 @@ -2129,6 +2129,21 @@ expand_call (tree exp, rtx target, int i if (TREE_NOTHROW (exp)) flags |= ECF_NOTHROW; + /* Output debugging information about the call site. */ + if (flag_inline_functions && EXPR_CALL_FILENODE (exp)) + { + location_t locus; + locus.file = EXPR_CALL_FILENAME (exp); + locus.line = EXPR_CALL_LINENO (exp); + /* Although basically you are on your own when trying to use + -ftest-coverage and -finline-functions at the same time, + I think it is still better to suppress the line numbers + generated here in that case. */ + if (flag_test_coverage) + emit_note (NOTE_INSN_REPEATED_LINE_NUMBER); + emit_line_note (locus); + } + /* See if we can find a DECL-node for the actual function. As a result, decide whether this is a call to an integrable function. */ Index: gcc/expr.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/expr.c,v retrieving revision 1.592 diff -u -d -p -r1.592 expr.c --- gcc/expr.c 7 Oct 2003 07:25:32 -0000 1.592 +++ gcc/expr.c 12 Oct 2003 15:37:55 -0000 @@ -1591,8 +1591,7 @@ emit_block_move_via_libcall (rtx dst, rt /* Now we have to build up the CALL_EXPR itself. */ call_expr = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (fn)), fn); - call_expr = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)), - call_expr, arg_list, NULL_TREE); + call_expr = build_call_expr (TREE_TYPE (TREE_TYPE (fn)), call_expr, arg_list); retval = expand_expr (call_expr, NULL_RTX, VOIDmode, 0); @@ -2704,8 +2703,7 @@ clear_storage_via_libcall (rtx object, r /* Now we have to build up the CALL_EXPR itself. */ call_expr = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (fn)), fn); - call_expr = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)), - call_expr, arg_list, NULL_TREE); + call_expr = build_call_expr (TREE_TYPE (TREE_TYPE (fn)), call_expr, arg_list); retval = expand_expr (call_expr, NULL_RTX, VOIDmode, 0); Index: gcc/tree.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/tree.c,v retrieving revision 1.333 diff -u -d -p -r1.333 tree.c --- gcc/tree.c 6 Oct 2003 13:50:39 -0000 1.333 +++ gcc/tree.c 12 Oct 2003 15:38:04 -0000 @@ -2500,6 +2500,26 @@ build_nt (enum tree_code code, ...) return t; } +tree +build_call_expr (tree tt, tree function, tree arg_list) +{ + tree fileid = input_location.file ? + get_identifier(input_location.file) : NULL_TREE; + tree call_expr = build (CALL_EXPR, tt, function, arg_list, fileid); + EXPR_CALL_SET_LINECOL (call_expr, input_location.line, 0); + return call_expr; +} + +tree +build_call_expr_nt (tree function, tree arg_list) +{ + tree fileid = input_location.file ? + get_identifier(input_location.file) : NULL_TREE; + tree call_expr = build_nt (CALL_EXPR, function, arg_list, fileid); + EXPR_CALL_SET_LINECOL (call_expr, input_location.line, 0); + return call_expr; +} + /* Create a DECL_... node of code CODE, name NAME and data type TYPE. We do NOT enter this node in any sort of symbol table. Index: gcc/tree.def =================================================================== RCS file: /cvs/gcc/gcc/gcc/tree.def,v retrieving revision 1.67 diff -u -d -p -r1.67 tree.def --- gcc/tree.def 22 Sep 2003 05:09:15 -0000 1.67 +++ gcc/tree.def 12 Oct 2003 15:38:04 -0000 @@ -471,8 +471,9 @@ DEFTREECODE (BIND_EXPR, "bind_expr", 'e' /* Function call. Operand 0 is the function. Operand 1 is the argument list, a list of expressions - made out of a chain of TREE_LIST nodes. */ -DEFTREECODE (CALL_EXPR, "call_expr", 'e', 2) + made out of a chain of TREE_LIST nodes. + Operand 2 is used by EXPR_CALL_FILENODE. */ +DEFTREECODE (CALL_EXPR, "call_expr", 'e', 3) /* Specify a value to compute along with its corresponding cleanup. Operand 0 argument is an expression whose value needs a cleanup. Index: gcc/tree.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/tree.h,v retrieving revision 1.447 diff -u -d -p -r1.447 tree.h --- gcc/tree.h 28 Sep 2003 19:09:49 -0000 1.447 +++ gcc/tree.h 12 Oct 2003 15:38:10 -0000 @@ -837,6 +837,15 @@ struct tree_vec GTY(()) #define TARGET_EXPR_INITIAL(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 1) #define TARGET_EXPR_CLEANUP(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 2) +/* In a CALL_EXPR node. */ +#define EXPR_CALL_FILENODE(NODE) TREE_OPERAND_CHECK_CODE (NODE, CALL_EXPR, 2) +#define EXPR_CALL_FILENAME(NODE) IDENTIFIER_POINTER (EXPR_CALL_FILENODE (NODE)) +#define EXPR_CALL_LINECOL(NODE) (CALL_EXPR_CHECK (NODE)->exp.complexity) +#define EXPR_CALL_LINENO(NODE) (EXPR_CALL_LINECOL (NODE) >> 12) +#define EXPR_CALL_COLNO(NODE) (EXPR_CALL_LINECOL (NODE) & 0xfff) +#define EXPR_CALL_SET_LINECOL(NODE, LINE, COL) \ + (EXPR_CALL_LINECOL(NODE) = ((LINE) << 12) | ((COL) & 0xfff)) + struct tree_exp GTY(()) { struct tree_common common; @@ -2112,6 +2121,8 @@ extern tree build_tree_list (tree, tree) extern tree build_decl (enum tree_code, tree, tree); extern tree build_block (tree, tree, tree, tree, tree); extern tree build_expr_wfl (tree, const char *, int, int); +extern tree build_call_expr (tree, tree, tree); +extern tree build_call_expr_nt (tree, tree); /* Construct various nodes representing data types. */ Index: gcc/ada/trans.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/ada/trans.c,v retrieving revision 1.34 diff -u -d -p -r1.34 trans.c --- gcc/ada/trans.c 29 Sep 2003 22:14:01 -0000 1.34 +++ gcc/ada/trans.c 12 Oct 2003 15:38:24 -0000 @@ -3005,9 +3005,8 @@ tree_transform (gnat_node) build_tree_list (NULL_TREE, gnu_actual)); } - gnu_subprog_call = build (CALL_EXPR, TREE_TYPE (gnu_subprog_type), - gnu_subprog_addr, gnu_actual_list, - NULL_TREE); + gnu_subprog_call = build_call_expr (TREE_TYPE (gnu_subprog_type), + gnu_subprog_addr, gnu_actual_list); TREE_SIDE_EFFECTS (gnu_subprog_call) = 1; /* If it is a function call, the result is the call expression. */ @@ -4460,11 +4459,9 @@ emit_discriminant_check (gnu_expr, gnat_ NULL_TREE, gnu_discr))); } - gnu_cond = build (CALL_EXPR, - TREE_TYPE (TREE_TYPE (gnu_discr_fct)), + gnu_cond = build_call_expr (TREE_TYPE (TREE_TYPE (gnu_discr_fct)), build_unary_op (ADDR_EXPR, NULL_TREE, gnu_discr_fct), - gnu_actual_list, - NULL_TREE); + gnu_actual_list); TREE_SIDE_EFFECTS (gnu_cond) = 1; return Index: gcc/ada/utils.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/ada/utils.c,v retrieving revision 1.33 diff -u -d -p -r1.33 utils.c --- gcc/ada/utils.c 22 Sep 2003 05:09:20 -0000 1.33 +++ gcc/ada/utils.c 12 Oct 2003 15:38:35 -0000 @@ -2118,8 +2118,8 @@ max_size (exp, max_p) max_size (TREE_OPERAND (exp, 1), max_p), max_size (TREE_OPERAND (exp, 2), max_p))); else if (code == CALL_EXPR && TREE_OPERAND (exp, 1) != 0) - return build (CALL_EXPR, type, TREE_OPERAND (exp, 0), - max_size (TREE_OPERAND (exp, 1), max_p)); + return build_call_expr (type, TREE_OPERAND (exp, 0), + max_size (TREE_OPERAND (exp, 1), max_p)); } } Index: gcc/ada/utils2.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/ada/utils2.c,v retrieving revision 1.16 diff -u -d -p -r1.16 utils2.c --- gcc/ada/utils2.c 1 May 2003 16:13:31 -0000 1.16 +++ gcc/ada/utils2.c 12 Oct 2003 15:38:35 -0000 @@ -1443,10 +1443,10 @@ build_call_1_expr (fundecl, arg) tree fundecl; tree arg; { - tree call = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fundecl)), - build_unary_op (ADDR_EXPR, NULL_TREE, fundecl), - chainon (NULL_TREE, build_tree_list (NULL_TREE, arg)), - NULL_TREE); + tree call = build_call_expr (TREE_TYPE (TREE_TYPE (fundecl)), + build_unary_op (ADDR_EXPR, NULL_TREE, fundecl), + chainon (NULL_TREE, + build_tree_list (NULL_TREE, arg))); TREE_SIDE_EFFECTS (call) = 1; @@ -1461,12 +1461,11 @@ build_call_2_expr (fundecl, arg1, arg2) tree fundecl; tree arg1, arg2; { - tree call = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fundecl)), - build_unary_op (ADDR_EXPR, NULL_TREE, fundecl), - chainon (chainon (NULL_TREE, - build_tree_list (NULL_TREE, arg1)), - build_tree_list (NULL_TREE, arg2)), - NULL_TREE); + tree call = build_call_expr (TREE_TYPE (TREE_TYPE (fundecl)), + build_unary_op (ADDR_EXPR, NULL_TREE, fundecl), + chainon (chainon (NULL_TREE, + build_tree_list (NULL_TREE, arg1)), + build_tree_list (NULL_TREE, arg2))); TREE_SIDE_EFFECTS (call) = 1; @@ -1479,9 +1478,9 @@ tree build_call_0_expr (fundecl) tree fundecl; { - tree call = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fundecl)), - build_unary_op (ADDR_EXPR, NULL_TREE, fundecl), - NULL_TREE, NULL_TREE); + tree call = build_call_expr (TREE_TYPE (TREE_TYPE (fundecl)), + build_unary_op (ADDR_EXPR, NULL_TREE, fundecl), + NULL_TREE); TREE_SIDE_EFFECTS (call) = 1; @@ -1754,8 +1753,8 @@ build_call_alloc_dealloc (gnu_obj, gnu_s build_tree_list (NULL_TREE, convert (gnu_size_type, gnu_align))); - gnu_call = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (gnu_proc)), - gnu_proc_addr, gnu_args, NULL_TREE); + gnu_call = build_call_expr (TREE_TYPE (TREE_TYPE (gnu_proc)), + gnu_proc_addr, gnu_args); TREE_SIDE_EFFECTS (gnu_call) = 1; return gnu_call; } @@ -1783,8 +1782,8 @@ build_call_alloc_dealloc (gnu_obj, gnu_s build_tree_list (NULL_TREE, convert (gnu_size_type, gnu_size))); - gnu_call = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (gnu_proc)), - gnu_proc_addr, gnu_args, NULL_TREE); + gnu_call = build_call_expr (TREE_TYPE (TREE_TYPE (gnu_proc)), + gnu_proc_addr, gnu_args); TREE_SIDE_EFFECTS (gnu_call) = 1; return gnu_call; } Index: gcc/cp/call.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/cp/call.c,v retrieving revision 1.438 diff -u -d -p -r1.438 call.c --- gcc/cp/call.c 7 Oct 2003 07:07:02 -0000 1.438 +++ gcc/cp/call.c 12 Oct 2003 15:38:47 -0000 @@ -303,7 +303,7 @@ build_call (tree function, tree parms) TREE_VALUE (tmp), t); } - function = build (CALL_EXPR, result_type, function, parms); + function = build_call_expr (result_type, function, parms); TREE_HAS_CONSTRUCTOR (function) = is_constructor; TREE_NOTHROW (function) = nothrow; @@ -4706,7 +4706,7 @@ build_java_interface_fn_ref (tree fn, tr lookup_fn = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (java_iface_lookup_fn)), java_iface_lookup_fn); - return build (CALL_EXPR, ptr_type_node, lookup_fn, lookup_args, NULL_TREE); + return build_call_expr (ptr_type_node, lookup_fn, lookup_args); } /* Returns the value to use for the in-charge parameter when making a Index: gcc/cp/cp-tree.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v retrieving revision 1.925 diff -u -d -p -r1.925 cp-tree.h --- gcc/cp/cp-tree.h 8 Oct 2003 00:42:56 -0000 1.925 +++ gcc/cp/cp-tree.h 12 Oct 2003 15:38:54 -0000 @@ -4153,6 +4153,7 @@ extern int member_p (tree); extern cp_lvalue_kind real_lvalue_p (tree); extern tree build_min (enum tree_code, tree, ...); extern tree build_min_nt (enum tree_code, ...); +extern tree build_call_expr_min_nt (tree, tree); extern tree build_min_non_dep (enum tree_code, tree, ...); extern tree build_cplus_new (tree, tree); extern tree get_target_expr (tree); Index: gcc/cp/decl2.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/cp/decl2.c,v retrieving revision 1.682 diff -u -d -p -r1.682 decl2.c --- gcc/cp/decl2.c 28 Sep 2003 04:37:40 -0000 1.682 +++ gcc/cp/decl2.c 12 Oct 2003 15:39:03 -0000 @@ -2980,7 +2980,7 @@ build_offset_ref_call_from_tree (tree fn 20030708); if (type_dependent_expression_p (fn) || any_type_dependent_arguments_p (args)) - return build_min_nt (CALL_EXPR, fn, args); + return build_call_expr_min_nt (fn, args); /* Transform the arguments and add the implicit "this" parameter. That must be done before the FN is transformed Index: gcc/cp/lex.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/cp/lex.c,v retrieving revision 1.317 diff -u -d -p -r1.317 lex.c --- gcc/cp/lex.c 18 Sep 2003 15:05:57 -0000 1.317 +++ gcc/cp/lex.c 12 Oct 2003 15:39:03 -0000 @@ -122,11 +122,10 @@ tree make_call_declarator (tree target, tree parms, tree cv_qualifiers, tree exception_specification) { - target = build_nt (CALL_EXPR, target, - tree_cons (parms, cv_qualifiers, NULL_TREE), - /* The third operand is really RTL. We - shouldn't put anything there. */ - NULL_TREE); + target = build_call_expr_nt (target, + tree_cons (parms, cv_qualifiers, NULL_TREE) + /* The third operand is really RTL. We + shouldn't put anything there. */); CALL_DECLARATOR_EXCEPTION_SPEC (target) = exception_specification; return target; } Index: gcc/cp/parser.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/cp/parser.c,v retrieving revision 1.115 diff -u -d -p -r1.115 parser.c --- gcc/cp/parser.c 30 Sep 2003 21:48:59 -0000 1.115 +++ gcc/cp/parser.c 12 Oct 2003 15:39:22 -0000 @@ -3561,7 +3561,7 @@ cp_parser_postfix_expression (cp_parser || any_type_dependent_arguments_p (args))) { postfix_expression - = build_min_nt (CALL_EXPR, postfix_expression, args); + = build_call_expr_min_nt (postfix_expression, args); break; } Index: gcc/cp/semantics.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/cp/semantics.c,v retrieving revision 1.368 diff -u -d -p -r1.368 semantics.c --- gcc/cp/semantics.c 23 Sep 2003 15:42:21 -0000 1.368 +++ gcc/cp/semantics.c 12 Oct 2003 15:39:30 -0000 @@ -1607,7 +1607,7 @@ finish_call_expr (tree fn, tree args, bo if (type_dependent_expression_p (fn) || any_type_dependent_arguments_p (args)) { - result = build_nt (CALL_EXPR, fn, args); + result = build_call_expr_nt (fn, args); KOENIG_LOOKUP_P (result) = koenig_p; return result; } @@ -1680,7 +1680,7 @@ finish_call_expr (tree fn, tree args, bo if (processing_template_decl) { if (type_dependent_expression_p (object)) - return build_nt (CALL_EXPR, orig_fn, orig_args); + return build_call_expr_nt (orig_fn, orig_args); object = build_non_dependent_expr (object); } @@ -1712,7 +1712,7 @@ finish_call_expr (tree fn, tree args, bo if (processing_template_decl) { - result = build (CALL_EXPR, TREE_TYPE (result), orig_fn, orig_args); + result = build_call_expr (TREE_TYPE (result), orig_fn, orig_args); KOENIG_LOOKUP_P (result) = koenig_p; } return result; @@ -1783,9 +1783,7 @@ finish_object_call_expr (tree fn, tree o } if (processing_template_decl) - return build_nt (CALL_EXPR, - build_nt (COMPONENT_REF, object, fn), - args); + return build_call_expr_nt (build_nt (COMPONENT_REF, object, fn), args); if (name_p (fn)) return build_method_call (object, fn, args, NULL_TREE, LOOKUP_NORMAL); @@ -2782,9 +2780,8 @@ simplify_aggr_init_expr (tree *tp) args = tree_cons (NULL_TREE, addr, args); } - call_expr = build (CALL_EXPR, - TREE_TYPE (TREE_TYPE (TREE_TYPE (fn))), - fn, args, NULL_TREE); + call_expr + = build_call_expr (TREE_TYPE (TREE_TYPE (TREE_TYPE (fn))), fn, args); if (style == arg) /* Tell the backend that we've added our return slot to the argument Index: gcc/cp/tree.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/cp/tree.c,v retrieving revision 1.348 diff -u -d -p -r1.348 tree.c --- gcc/cp/tree.c 22 Sep 2003 05:09:23 -0000 1.348 +++ gcc/cp/tree.c 12 Oct 2003 15:39:30 -0000 @@ -1292,6 +1292,16 @@ build_min_nt (enum tree_code code, ...) return t; } +tree +build_call_expr_min_nt (tree function, tree arg_list) +{ + tree fileid = input_location.file ? + get_identifier(input_location.file) : NULL_TREE; + tree call_expr = build_min_nt (CALL_EXPR, function, arg_list, fileid); + EXPR_CALL_SET_LINECOL (call_expr, input_location.line, 0); + return call_expr; +} + /* Similar to `build', but for template definitions. */ tree Index: gcc/java/builtins.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/java/builtins.c,v retrieving revision 1.21 diff -u -d -p -r1.21 builtins.c --- gcc/java/builtins.c 5 Oct 2003 02:52:33 -0000 1.21 +++ gcc/java/builtins.c 12 Oct 2003 15:39:30 -0000 @@ -119,8 +119,7 @@ java_build_function_call_expr (tree fn, tree call_expr; call_expr = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (fn)), fn); - call_expr = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)), - call_expr, arglist); + call_expr = build_call_expr (TREE_TYPE (TREE_TYPE (fn)), call_expr, arglist); TREE_SIDE_EFFECTS (call_expr) = 1; return fold (call_expr); } Index: gcc/java/decl.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/java/decl.c,v retrieving revision 1.167 diff -u -d -p -r1.167 decl.c --- gcc/java/decl.c 1 Oct 2003 16:22:11 -0000 1.167 +++ gcc/java/decl.c 12 Oct 2003 15:39:37 -0000 @@ -1700,10 +1700,10 @@ complete_start_java_method (tree fndecl) && ! CLASS_INTERFACE (TYPE_NAME (current_class))) { tree clas = DECL_CONTEXT (fndecl); - tree init = build (CALL_EXPR, void_type_node, - build_address_of (soft_initclass_node), - build_tree_list (NULL_TREE, build_class_ref (clas)), - NULL_TREE); + tree init + = build_call_expr (void_type_node, + build_address_of (soft_initclass_node), + build_tree_list (NULL_TREE, build_class_ref (clas))); TREE_SIDE_EFFECTS (init) = 1; expand_expr_stmt (init); } Index: gcc/java/expr.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/java/expr.c,v retrieving revision 1.175 diff -u -d -p -r1.175 expr.c --- gcc/java/expr.c 1 Oct 2003 16:22:11 -0000 1.175 +++ gcc/java/expr.c 12 Oct 2003 15:39:46 -0000 @@ -562,11 +562,9 @@ build_java_athrow (tree node) { tree call; - call = build (CALL_EXPR, - void_type_node, - build_address_of (throw_node), - build_tree_list (NULL_TREE, node), - NULL_TREE); + call = build_call_expr (void_type_node, + build_address_of (throw_node), + build_tree_list (NULL_TREE, node)); TREE_SIDE_EFFECTS (call) = 1; expand_expr_stmt (call); java_stack_pop (stack_pointer); @@ -644,9 +642,10 @@ encode_newarray_type (tree type) static tree build_java_throw_out_of_bounds_exception (tree index) { - tree node = build (CALL_EXPR, int_type_node, - build_address_of (soft_badarrayindex_node), - build_tree_list (NULL_TREE, index), NULL_TREE); + tree node + = build_call_expr (int_type_node, + build_address_of (soft_badarrayindex_node), + build_tree_list (NULL_TREE, index)); TREE_SIDE_EFFECTS (node) = 1; /* Allows expansion within ANDIF */ return (node); } @@ -666,9 +665,9 @@ build_java_array_length_access (tree nod of type ptr_type_node at this point is `aconst_null; arraylength' or something equivalent. */ if (type == ptr_type_node) - return build (CALL_EXPR, int_type_node, - build_address_of (soft_nullpointer_node), - NULL_TREE, NULL_TREE); + return build_call_expr (int_type_node, + build_address_of (soft_nullpointer_node), + NULL_TREE); if (!is_array_type_p (type)) abort (); @@ -697,9 +696,9 @@ java_check_reference (tree expr, int che expr = save_expr (expr); expr = build (COND_EXPR, TREE_TYPE (expr), build (EQ_EXPR, boolean_type_node, expr, null_pointer_node), - build (CALL_EXPR, void_type_node, - build_address_of (soft_nullpointer_node), - NULL_TREE, NULL_TREE), + build_call_expr (void_type_node, + build_address_of (soft_nullpointer_node), + NULL_TREE), expr); } @@ -823,11 +822,10 @@ build_java_arraystore_check (tree array, } /* Build an invocation of _Jv_CheckArrayStore */ - check = build (CALL_EXPR, void_type_node, - build_address_of (soft_checkarraystore_node), - tree_cons (NULL_TREE, array, - build_tree_list (NULL_TREE, object)), - NULL_TREE); + check = build_call_expr (void_type_node, + build_address_of (soft_checkarraystore_node), + tree_cons (NULL_TREE, array, + build_tree_list (NULL_TREE, object))); TREE_SIDE_EFFECTS (check) = 1; return check; @@ -886,12 +884,11 @@ build_newarray (int atype_value, tree le else type_arg = build_class_ref (prim_type); - return build (CALL_EXPR, promote_type (type), - build_address_of (soft_newarray_node), - tree_cons (NULL_TREE, - type_arg, - build_tree_list (NULL_TREE, length)), - NULL_TREE); + return build_call_expr (promote_type (type), + build_address_of (soft_newarray_node), + tree_cons (NULL_TREE, + type_arg, + build_tree_list (NULL_TREE, length))); } /* Generates anewarray from a given CLASS_TYPE. Gets from the stack the size @@ -905,13 +902,11 @@ build_anewarray (tree class_type, tree l host_integerp (length, 0) ? tree_low_cst (length, 0) : -1); - return build (CALL_EXPR, promote_type (type), - build_address_of (soft_anewarray_node), - tree_cons (NULL_TREE, length, - tree_cons (NULL_TREE, build_class_ref (class_type), - build_tree_list (NULL_TREE, - null_pointer_node))), - NULL_TREE); + return build_call_expr (promote_type (type), + build_address_of (soft_anewarray_node), + tree_cons (NULL_TREE, length, tree_cons (NULL_TREE, + build_class_ref (class_type), + build_tree_list (NULL_TREE, null_pointer_node)))); } /* Return a node the evaluates 'new TYPE[LENGTH]'. */ @@ -938,13 +933,13 @@ expand_java_multianewarray (tree class_t for( i = 0; i < ndim; i++ ) args = tree_cons (NULL_TREE, pop_value (int_type_node), args); - push_value (build (CALL_EXPR, - promote_type (class_type), - build_address_of (soft_multianewarray_node), - tree_cons (NULL_TREE, build_class_ref (class_type), - tree_cons (NULL_TREE, - build_int_2 (ndim, 0), args )), - NULL_TREE)); + push_value (build_call_expr (promote_type (class_type), + build_address_of (soft_multianewarray_node), + tree_cons (NULL_TREE, + build_class_ref (class_type), + tree_cons (NULL_TREE, + build_int_2 (ndim, 0), + args)))); } /* ARRAY[INDEX] <- RHS. build_java_check_indexed_type makes sure that @@ -1006,9 +1001,9 @@ expand_java_arrayload (tree lhs_type_nod /* The only way we could get a node of type ptr_type_node at this point is `aconst_null; arraylength' or something equivalent, so unconditionally throw NullPointerException. */ - load_node = build (CALL_EXPR, lhs_type_node, - build_address_of (soft_nullpointer_node), - NULL_TREE, NULL_TREE); + load_node = build_call_expr (lhs_type_node, + build_address_of (soft_nullpointer_node), + NULL_TREE); else { lhs_type_node = build_java_check_indexed_type (array_node, lhs_type_node); @@ -1039,11 +1034,9 @@ expand_java_array_length (void) static tree build_java_monitor (tree call, tree object) { - return (build (CALL_EXPR, - void_type_node, - build_address_of (call), - build_tree_list (NULL_TREE, object), - NULL_TREE)); + return build_call_expr (void_type_node, + build_address_of (call), + build_tree_list (NULL_TREE, object)); } /* Emit code for one of the PUSHC instructions. */ @@ -1146,12 +1139,11 @@ expand_java_NEW (tree type) if (! CLASS_LOADED_P (type)) load_class (type, 1); safe_layout_class (type); - push_value (build (CALL_EXPR, promote_type (type), - build_address_of (alloc_node), - tree_cons (NULL_TREE, build_class_ref (type), - build_tree_list (NULL_TREE, - size_in_bytes (type))), - NULL_TREE)); + push_value (build_call_expr (promote_type (type), + build_address_of (alloc_node), + tree_cons (NULL_TREE, build_class_ref (type), + build_tree_list (NULL_TREE, + size_in_bytes (type))))); } /* This returns an expression which will extract the class of an @@ -1228,12 +1220,11 @@ build_instanceof (tree value, tree type) } else { - expr = build (CALL_EXPR, itype, - build_address_of (soft_instanceof_node), - tree_cons (NULL_TREE, value, - build_tree_list (NULL_TREE, - build_class_ref (type))), - NULL_TREE); + expr = build_call_expr (itype, + build_address_of (soft_instanceof_node), + tree_cons (NULL_TREE, value, + build_tree_list (NULL_TREE, + build_class_ref (type)))); } TREE_SIDE_EFFECTS (expr) = TREE_SIDE_EFFECTS (value); return expr; @@ -1251,11 +1242,10 @@ static void expand_java_CHECKCAST (tree type) { tree value = pop_value (ptr_type_node); - value = build (CALL_EXPR, promote_type (type), - build_address_of (soft_checkcast_node), - tree_cons (NULL_TREE, build_class_ref (type), - build_tree_list (NULL_TREE, value)), - NULL_TREE); + value = build_call_expr (promote_type (type), + build_address_of (soft_checkcast_node), + tree_cons (NULL_TREE, build_class_ref (type), + build_tree_list (NULL_TREE, value))); push_value (value); } @@ -1312,11 +1302,10 @@ build_java_soft_divmod (enum tree_code o if (! call) abort (); - call = build (CALL_EXPR, type, - build_address_of (call), - tree_cons (NULL_TREE, arg1, - build_tree_list (NULL_TREE, arg2)), - NULL_TREE); + call = build_call_expr (type, + build_address_of (call), + tree_cons (NULL_TREE, arg1, + build_tree_list (NULL_TREE, arg2))); return call; } @@ -1379,11 +1368,10 @@ build_java_binop (enum tree_code op, tre arg1 = convert (double_type_node, arg1); arg2 = convert (double_type_node, arg2); } - call = build (CALL_EXPR, double_type_node, - build_address_of (soft_fmod_node), - tree_cons (NULL_TREE, arg1, - build_tree_list (NULL_TREE, arg2)), - NULL_TREE); + call = build_call_expr (double_type_node, + build_address_of (soft_fmod_node), + tree_cons (NULL_TREE, arg1, + build_tree_list (NULL_TREE, arg2))); if (type != double_type_node) call = convert (type, call); return call; @@ -1699,10 +1687,10 @@ build_class_init (tree clas, tree expr) if (always_initialize_class_p) { - init = build (CALL_EXPR, void_type_node, - build_address_of (soft_initclass_node), - build_tree_list (NULL_TREE, build_class_ref (clas)), - NULL_TREE); + init = build_call_expr (void_type_node, + build_address_of (soft_initclass_node), + build_tree_list (NULL_TREE, + build_class_ref (clas))); TREE_SIDE_EFFECTS (init) = 1; } else @@ -1729,10 +1717,10 @@ build_class_init (tree clas, tree expr) DECL_IGNORED_P (*init_test_decl) = 1; } - init = build (CALL_EXPR, void_type_node, - build_address_of (soft_initclass_node), - build_tree_list (NULL_TREE, build_class_ref (clas)), - NULL_TREE); + init = build_call_expr (void_type_node, + build_address_of (soft_initclass_node), + build_tree_list (NULL_TREE, + build_class_ref (clas))); TREE_SIDE_EFFECTS (init) = 1; init = build (COND_EXPR, void_type_node, build (EQ_EXPR, boolean_type_node, @@ -1979,9 +1967,9 @@ build_invokeinterface (tree dtable, tree tree_cons (NULL_TREE, build_class_ref (interface), build_tree_list (NULL_TREE, idx))); - return build (CALL_EXPR, ptr_type_node, - build_address_of (soft_lookupinterfacemethod_node), - lookup_arg, NULL_TREE); + return build_call_expr (ptr_type_node, + build_address_of (soft_lookupinterfacemethod_node), + lookup_arg); } /* Expand one of the invoke_* opcodes. @@ -2095,7 +2083,7 @@ expand_invoke (int opcode, int method_re } func = build1 (NOP_EXPR, build_pointer_type (method_type), func); - call = build (CALL_EXPR, TREE_TYPE (method_type), func, arg_list, NULL_TREE); + call = build_call_expr (TREE_TYPE (method_type), func, arg_list); TREE_SIDE_EFFECTS (call) = 1; call = check_for_builtin (method, call); @@ -2178,10 +2166,9 @@ build_jni_stub (tree method) /* Compute the local `env' by calling _Jv_GetJNIEnvNewFrame. */ body = build (MODIFY_EXPR, ptr_type_node, env_var, - build (CALL_EXPR, ptr_type_node, - build_address_of (soft_getjnienvnewframe_node), - build_tree_list (NULL_TREE, klass), - NULL_TREE)); + build_call_expr (ptr_type_node, + build_address_of (soft_getjnienvnewframe_node), + build_tree_list (NULL_TREE, klass))); CAN_COMPLETE_NORMALLY (body) = 1; /* All the arguments to this method become arguments to the @@ -2244,15 +2231,16 @@ build_jni_stub (tree method) meth_var, meth_var, build (MODIFY_EXPR, ptr_type_node, meth_var, - build (CALL_EXPR, ptr_type_node, - build_address_of (soft_lookupjnimethod_node), - lookup_arg, NULL_TREE))); + build_call_expr (ptr_type_node, + build_address_of + (soft_lookupjnimethod_node), + lookup_arg))); /* Now we make the actual JNI call via the resulting function pointer. */ - call = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (method)), - build1 (NOP_EXPR, jni_func_type, jnifunc), - args, NULL_TREE); + call = build_call_expr (TREE_TYPE (TREE_TYPE (method)), + build1 (NOP_EXPR, jni_func_type, jnifunc), + args); /* If the JNI call returned a result, capture it here. If we had to unwrap JNI object results, we would do that here. */ @@ -2267,10 +2255,9 @@ build_jni_stub (tree method) TREE_SIDE_EFFECTS (body) = 1; /* Now free the environment we allocated. */ - call = build (CALL_EXPR, ptr_type_node, - build_address_of (soft_jnipopsystemframe_node), - build_tree_list (NULL_TREE, env_var), - NULL_TREE); + call = build_call_expr (ptr_type_node, + build_address_of (soft_jnipopsystemframe_node), + build_tree_list (NULL_TREE, env_var)); TREE_SIDE_EFFECTS (call) = 1; CAN_COMPLETE_NORMALLY (call) = 1; body = build (COMPOUND_EXPR, void_type_node, body, call); Index: gcc/java/java-tree.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/java/java-tree.h,v retrieving revision 1.185 diff -u -d -p -r1.185 java-tree.h --- gcc/java/java-tree.h 1 Oct 2003 16:22:11 -0000 1.185 +++ gcc/java/java-tree.h 12 Oct 2003 15:39:46 -0000 @@ -1714,19 +1714,17 @@ extern tree *type_map; #define BUILD_MONITOR_ENTER(WHERE, ARG) \ { \ - (WHERE) = build (CALL_EXPR, int_type_node, \ + (WHERE) = build_call_expr (int_type_node, \ build_address_of (soft_monitorenter_node), \ - build_tree_list (NULL_TREE, (ARG)), \ - NULL_TREE); \ + build_tree_list (NULL_TREE, (ARG))); \ TREE_SIDE_EFFECTS (WHERE) = 1; \ } #define BUILD_MONITOR_EXIT(WHERE, ARG) \ { \ - (WHERE) = build (CALL_EXPR, int_type_node, \ + (WHERE) = build_call_expr (int_type_node, \ build_address_of (soft_monitorexit_node), \ - build_tree_list (NULL_TREE, (ARG)), \ - NULL_TREE); \ + build_tree_list (NULL_TREE, (ARG))); \ TREE_SIDE_EFFECTS (WHERE) = 1; \ } Index: gcc/java/parse.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/java/parse.h,v retrieving revision 1.92 diff -u -d -p -r1.92 parse.h --- gcc/java/parse.h 3 Sep 2003 13:44:43 -0000 1.92 +++ gcc/java/parse.h 12 Oct 2003 15:39:48 -0000 @@ -664,9 +664,9 @@ typedef struct jdeplist_s jdeplist; #define BUILD_THROW(WHERE, WHAT) \ { \ (WHERE) = \ - build (CALL_EXPR, void_type_node, \ + build_call_expr (void_type_node, \ build_address_of (throw_node), \ - build_tree_list (NULL_TREE, (WHAT)), NULL_TREE); \ + build_tree_list (NULL_TREE, (WHAT))); \ TREE_SIDE_EFFECTS ((WHERE)) = 1; \ } Index: gcc/java/parse.y =================================================================== RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v retrieving revision 1.448 diff -u -d -p -r1.448 parse.y --- gcc/java/parse.y 28 Sep 2003 22:18:33 -0000 1.448 +++ gcc/java/parse.y 12 Oct 2003 15:40:13 -0000 @@ -8157,11 +8157,10 @@ java_expand_method_bodies (tree class) && ! DECL_CLINIT_P (decl) && ! CLASS_INTERFACE (TYPE_NAME (class))) { - tree init = build (CALL_EXPR, void_type_node, - build_address_of (soft_initclass_node), - build_tree_list (NULL_TREE, - build_class_ref (class)), - NULL_TREE); + tree init = build_call_expr (void_type_node, + build_address_of (soft_initclass_node), + build_tree_list + (NULL_TREE, build_class_ref (class))); TREE_SIDE_EFFECTS (init) = 1; body = build (COMPOUND_EXPR, TREE_TYPE (body), init, body); BLOCK_EXPR_BODY (block) = body; @@ -10821,12 +10820,11 @@ patch_invoke (tree patch, tree method, t alloc_node = (class_has_finalize_method (class) ? alloc_object_node : alloc_no_finalizer_node); - new = build (CALL_EXPR, promote_type (class), - build_address_of (alloc_node), - tree_cons (NULL_TREE, build_class_ref (class), - build_tree_list (NULL_TREE, - size_in_bytes (class))), - NULL_TREE); + new = build_call_expr (promote_type (class), + build_address_of (alloc_node), + tree_cons (NULL_TREE, build_class_ref (class), + build_tree_list + (NULL_TREE, size_in_bytes (class)))); saved_new = save_expr (new); c1 = build_tree_list (NULL_TREE, saved_new); TREE_CHAIN (c1) = TREE_OPERAND (original_call, 1); @@ -12589,7 +12587,7 @@ build_this_super_qualified_invocation (i static tree build_method_invocation (tree name, tree args) { - tree call = build (CALL_EXPR, NULL_TREE, name, args, NULL_TREE); + tree call = build_call_expr (NULL_TREE, name, args); TREE_SIDE_EFFECTS (call) = 1; EXPR_WFL_LINECOL (call) = EXPR_WFL_LINECOL (name); return call; @@ -14414,11 +14412,11 @@ patch_cast (tree node, tree wfl_op) } /* The cast requires a run-time check */ - return build (CALL_EXPR, promote_type (cast_type), - build_address_of (soft_checkcast_node), - tree_cons (NULL_TREE, build_class_ref (cast_type), - build_tree_list (NULL_TREE, op)), - NULL_TREE); + return build_call_expr (promote_type (cast_type), + build_address_of (soft_checkcast_node), + tree_cons (NULL_TREE, + build_class_ref (cast_type), + build_tree_list (NULL_TREE, op))); } /* Any other casts are proven incorrect at compile time */ @@ -14610,12 +14608,13 @@ patch_newarray (tree node) /* Can't reuse what's already written in expr.c because it uses the JVM stack representation. Provide a build_multianewarray. FIXME */ - return build (CALL_EXPR, array_type, - build_address_of (soft_multianewarray_node), - tree_cons (NULL_TREE, build_class_ref (TREE_TYPE (array_type)), - tree_cons (NULL_TREE, - build_int_2 (ndims, 0), dims )), - NULL_TREE); + return build_call_expr (array_type, + build_address_of (soft_multianewarray_node), + tree_cons (NULL_TREE, + build_class_ref (TREE_TYPE (array_type)), + tree_cons (NULL_TREE, + build_int_2 (ndims, 0), + dims))); } /* 10.6 Array initializer. */ @@ -15396,7 +15395,7 @@ build_assertion (int location, tree cond /* Call CLASS.desiredAssertionStatus(). */ id = build_wfl_node (get_identifier ("desiredAssertionStatus")); - call = build (CALL_EXPR, NULL_TREE, id, NULL_TREE, NULL_TREE); + call = build_call_expr (NULL_TREE, id, NULL_TREE); call = make_qualified_primary (classdollar, call, location); TREE_SIDE_EFFECTS (call) = 1; Index: gcc/objc/objc-act.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/objc/objc-act.c,v retrieving revision 1.200 diff -u -d -p -r1.200 objc-act.c --- gcc/objc/objc-act.c 3 Oct 2003 22:49:54 -0000 1.200 +++ gcc/objc/objc-act.c 12 Oct 2003 15:40:22 -0000 @@ -1907,10 +1907,9 @@ build_module_descriptor (void) init_function_name = get_file_function_name ('I'); start_function (void_list_node_1, - build_nt (CALL_EXPR, init_function_name, - tree_cons (NULL_TREE, NULL_TREE, - OBJC_VOID_AT_END), - NULL_TREE), + build_call_expr_nt (init_function_name, + tree_cons (NULL_TREE, NULL_TREE, + OBJC_VOID_AT_END)), NULL_TREE); store_parm_decls (); @@ -7732,7 +7731,7 @@ really_start_method (tree method, tree p push_lang_context (lang_name_c); #endif - method_decl = build_nt (CALL_EXPR, method_id, parmlist, NULL_TREE); + method_decl = build_call_expr_nt (method_id, parmlist); /* Check the declarator portion of the return type for the method. */ if ((ret_decl = TREE_VALUE (TREE_TYPE (method)))) Index: gcc/treelang/treetree.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/treelang/treetree.c,v retrieving revision 1.36 diff -u -d -p -r1.36 treetree.c --- gcc/treelang/treetree.c 22 Sep 2003 05:09:32 -0000 1.36 +++ gcc/treelang/treetree.c 12 Oct 2003 15:40:34 -0000 @@ -762,7 +762,7 @@ tree_code_get_expression (unsigned int e { tree fun_ptr; fun_ptr = build1 (ADDR_EXPR, build_pointer_type (type), op1); - ret1 = build (CALL_EXPR, type, fun_ptr, nreverse (op2)); + ret1 = build_call_expr (type, fun_ptr, nreverse (op2)); } break;