diff options
author | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-30 03:03:14 +0000 |
---|---|---|
committer | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-30 03:03:14 +0000 |
commit | 054da6d755c0fb6143a144d0d051b0633f62012b (patch) | |
tree | 84131f99052527c90f0168a49f3799ddf508f502 /gcc/cp/decl2.c | |
parent | 31f9e4524e5ab3655bca79184d395e99b7061960 (diff) | |
download | gcc-054da6d755c0fb6143a144d0d051b0633f62012b.tar.gz |
* cp-tree.h (cp_build_function_call_nary): Declare.
* typeck.c (cp_build_function_call_nary): Define.
* decl.c (register_dtor_fn): Use it instead of
cp_build_function_call.
(cxx_maybe_build_cleanup): Likewise.
* decl2.c (generate_ctor_or_dtor_function): Likewise.
* except.c (do_get_exception_ptr): Likewise.
(do_begin_catch): Likewise.
(do_allocate_exception): Likewise.
(do_free_exception): Likewise.
(build_throw): Likewise. Use cp_build_function_call_vec instead
of cp_build_function_call.
(do_end_catch): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160045 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 031310112d7..0692e1a229f 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -3275,7 +3275,6 @@ generate_ctor_or_dtor_function (bool constructor_p, int priority, location_t *locus) { char function_key; - tree arguments; tree fndecl; tree body; size_t i; @@ -3308,17 +3307,18 @@ generate_ctor_or_dtor_function (bool constructor_p, int priority, /* Calls to pure or const functions will expand to nothing. */ if (! (flags_from_decl_or_type (fndecl) & (ECF_CONST | ECF_PURE))) { + tree call; + if (! body) body = start_objects (function_key, priority); - arguments = tree_cons (NULL_TREE, - build_int_cst (NULL_TREE, priority), - NULL_TREE); - arguments = tree_cons (NULL_TREE, - build_int_cst (NULL_TREE, constructor_p), - arguments); - finish_expr_stmt (cp_build_function_call (fndecl, arguments, - tf_warning_or_error)); + call = cp_build_function_call_nary (fndecl, tf_warning_or_error, + build_int_cst (NULL_TREE, + constructor_p), + build_int_cst (NULL_TREE, + priority), + NULL_TREE); + finish_expr_stmt (call); } } |