diff options
author | Roger Sayle <roger@eyesopen.com> | 2004-06-24 05:26:07 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2004-06-24 05:26:07 +0000 |
commit | d522060b39e1627ebc07734d756b27637c957c53 (patch) | |
tree | f49a4f53f5fccb080cacfa1d3a49e5db58a3853c /gcc/cp | |
parent | a7cc468aa3453959c3eccafd5e66eb603f69696c (diff) | |
download | gcc-d522060b39e1627ebc07734d756b27637c957c53.zip gcc-d522060b39e1627ebc07734d756b27637c957c53.tar.gz gcc-d522060b39e1627ebc07734d756b27637c957c53.tar.bz2 |
c-common.c (expand_unordered_cmp): Delete.
* c-common.c (expand_unordered_cmp): Delete.
(expand_tree_builtin): Delete.
* c-common.h (expand_tree_builtin): Delete function prototype.
* c-typeck.c (build_function_call): Don't call expand_tree_builtin.
* call.c (build_cxx_call): Don't call expand_tree_builtin. No
longer take both "args" and "convert_args" as arguments.
(build_op_delete_call): Update call to build_cxx_call.
(build_over_call): Likewise, update call to build_cxx_call.
* cp-tree.h (build_cxx_call): Update funtion prototype.
* typeck.c (build_function_call): Don't call expand_tree_builtin.
* rtti.c (throw_bad_cast): Update call to build_cxx_call.
(throw_bad_typeid): Likewise.
(build_dynamic_cast_1): Likewise.
From-SVN: r83579
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/cp/call.c | 24 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 2 | ||||
-rw-r--r-- | gcc/cp/rtti.c | 6 | ||||
-rw-r--r-- | gcc/cp/typeck.c | 17 |
5 files changed, 22 insertions, 39 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f67eb22..531df51 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,15 @@ +2004-06-23 Roger Sayle <roger@eyesopen.com> + + * call.c (build_cxx_call): Don't call expand_tree_builtin. No + longer take both "args" and "convert_args" as arguments. + (build_op_delete_call): Update call to build_cxx_call. + (build_over_call): Likewise, update call to build_cxx_call. + * cp-tree.h (build_cxx_call): Update funtion prototype. + * typeck.c (build_function_call): Don't call expand_tree_builtin. + * rtti.c (throw_bad_cast): Update call to build_cxx_call. + (throw_bad_typeid): Likewise. + (build_dynamic_cast_1): Likewise. + 2004-06-22 Richard Henderson <rth@redhat.com> * class.c (build_vfn_ref): Take a pointer not object. Build diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 2a659cc..e02fa17 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -4023,7 +4023,7 @@ build_op_delete_call (enum tree_code code, tree addr, tree size, /* The placement args might not be suitable for overload resolution at this point, so build the call directly. */ mark_used (fn); - return build_cxx_call (fn, args, args); + return build_cxx_call (fn, args); } else return build_function_call (fn, args); @@ -4843,33 +4843,19 @@ build_over_call (struct z_candidate *cand, int flags) else fn = build_addr_func (fn); - return build_cxx_call (fn, args, converted_args); + return build_cxx_call (fn, converted_args); } -/* Build and return a call to FN, using the the CONVERTED_ARGS. ARGS - gives the original form of the arguments. This function performs +/* Build and return a call to FN, using ARGS. This function performs no overload resolution, conversion, or other high-level operations. */ tree -build_cxx_call(tree fn, tree args, tree converted_args) +build_cxx_call (tree fn, tree args) { tree fndecl; - /* Recognize certain built-in functions so we can make tree-codes - other than CALL_EXPR. We do this when it enables fold-const.c - to do something useful. */ - if (TREE_CODE (fn) == ADDR_EXPR - && TREE_CODE (TREE_OPERAND (fn, 0)) == FUNCTION_DECL - && DECL_BUILT_IN (TREE_OPERAND (fn, 0))) - { - tree exp; - exp = expand_tree_builtin (TREE_OPERAND (fn, 0), args, converted_args); - if (exp) - return exp; - } - - fn = build_call (fn, converted_args); + fn = build_call (fn, args); /* If this call might throw an exception, note that fact. */ fndecl = get_callee_fndecl (fn); diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 36d98c60..9638c2d 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -3626,7 +3626,7 @@ extern tree strip_top_quals (tree); extern tree perform_implicit_conversion (tree, tree); extern tree perform_direct_initialization_if_possible (tree, tree); extern tree in_charge_arg_for_name (tree); -extern tree build_cxx_call (tree, tree, tree); +extern tree build_cxx_call (tree, tree); #ifdef ENABLE_CHECKING extern void validate_conversion_obstack (void); #endif /* ENABLE_CHECKING */ diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index ac149c8..b57de9d 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -176,7 +176,7 @@ throw_bad_cast (void) fn = push_throw_library_fn (fn, build_function_type (ptr_type_node, void_list_node)); - return build_cxx_call (fn, NULL_TREE, NULL_TREE); + return build_cxx_call (fn, NULL_TREE); } /* Return an expression for "__cxa_bad_typeid()". The expression @@ -193,7 +193,7 @@ throw_bad_typeid (void) fn = push_throw_library_fn (fn, t); } - return convert_from_reference (build_cxx_call (fn, NULL_TREE, NULL_TREE)); + return convert_from_reference (build_cxx_call (fn, NULL_TREE)); } /* Return an lvalue expression whose type is "const std::type_info" @@ -652,7 +652,7 @@ build_dynamic_cast_1 (tree type, tree expr) pop_nested_namespace (ns); dynamic_cast_node = dcast_fn; } - result = build_cxx_call (dcast_fn, elems, elems); + result = build_cxx_call (dcast_fn, elems); if (tc == REFERENCE_TYPE) { diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 8800007..2dc21db 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -2411,7 +2411,6 @@ build_function_call (tree function, tree params) { tree fntype, fndecl; tree coerced_params; - tree result; tree name = NULL_TREE; int is_method; tree original = function; @@ -2489,21 +2488,7 @@ build_function_call (tree function, tree params) if (warn_format) check_function_format (NULL, TYPE_ATTRIBUTES (fntype), coerced_params); - /* Recognize certain built-in functions so we can make tree-codes - other than CALL_EXPR. We do this when it enables fold-const.c - to do something useful. */ - - if (TREE_CODE (function) == ADDR_EXPR - && TREE_CODE (TREE_OPERAND (function, 0)) == FUNCTION_DECL - && DECL_BUILT_IN (TREE_OPERAND (function, 0))) - { - result = expand_tree_builtin (TREE_OPERAND (function, 0), - params, coerced_params); - if (result) - return result; - } - - return build_cxx_call (function, params, coerced_params); + return build_cxx_call (function, coerced_params); } /* Convert the actual parameter expressions in the list VALUES |