summaryrefslogtreecommitdiff
path: root/gcc/cp/except.c
diff options
context:
space:
mode:
authorfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-09 15:18:40 +0000
committerfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-09 15:18:40 +0000
commitfb83f216f34375652930fdd2087bceb8deac6daa (patch)
tree99c1017dc9ca532faa156ceb39817e89d18bfb28 /gcc/cp/except.c
parentfd70b918fb48af1591d29b6496f293212a3b8456 (diff)
downloadgcc-fb83f216f34375652930fdd2087bceb8deac6daa.tar.gz
* call.c (build_java_interface_fn_ref): Call build_function_type_list
instead of build_function_type. * decl.c (cxx_init_decl_processing): Likewise. (declare_global_var): Likewise. (get_atexit_node): Likewise. (expand_static_init): Likewise. * decl2.c (start_objects): Likewise. (start_static_storage_duration_function): Likewise. * except.c (init_exception_processing): Likewise. (build_exc_ptr): Likewise. (build_throw): Likewise. * rtti.c (throw_bad_cast): Likewise. (throw_bad_typeid): Likewise. (build_dynamic_cast_1): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160486 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/except.c')
-rw-r--r--gcc/cp/except.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index 7be760e18c0..c682c8d8cfe 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -62,15 +62,14 @@ init_exception_processing (void)
/* void std::terminate (); */
push_namespace (std_identifier);
- tmp = build_function_type (void_type_node, void_list_node);
+ tmp = build_function_type_list (void_type_node, NULL_TREE);
terminate_node = build_cp_library_fn_ptr ("terminate", tmp);
TREE_THIS_VOLATILE (terminate_node) = 1;
TREE_NOTHROW (terminate_node) = 1;
pop_namespace ();
/* void __cxa_call_unexpected(void *); */
- tmp = tree_cons (NULL_TREE, ptr_type_node, void_list_node);
- tmp = build_function_type (void_type_node, tmp);
+ tmp = build_function_type_list (void_type_node, ptr_type_node, NULL_TREE);
call_unexpected_node
= push_throw_library_fn (get_identifier ("__cxa_call_unexpected"), tmp);
@@ -160,8 +159,9 @@ build_exc_ptr (void)
static tree
declare_nothrow_library_fn (tree name, tree return_type, tree parm_type)
{
- tree tmp = tree_cons (NULL_TREE, parm_type, void_list_node);
- return push_library_fn (name, build_function_type (return_type, tmp),
+ return push_library_fn (name, build_function_type_list (return_type,
+ parm_type,
+ NULL_TREE),
empty_except_spec);
}
@@ -650,8 +650,9 @@ build_throw (tree exp)
if (!get_global_value_if_present (fn, &fn))
{
/* Declare void _Jv_Throw (void *). */
- tree tmp = tree_cons (NULL_TREE, ptr_type_node, void_list_node);
- tmp = build_function_type (ptr_type_node, tmp);
+ tree tmp;
+ tmp = build_function_type_list (ptr_type_node,
+ ptr_type_node, NULL_TREE);
fn = push_throw_library_fn (fn, tmp);
}
else if (really_overloaded_fn (fn))
@@ -675,9 +676,8 @@ build_throw (tree exp)
/* The CLEANUP_TYPE is the internal type of a destructor. */
if (!cleanup_type)
{
- tmp = void_list_node;
- tmp = tree_cons (NULL_TREE, ptr_type_node, tmp);
- tmp = build_function_type (void_type_node, tmp);
+ tmp = build_function_type_list (void_type_node,
+ ptr_type_node, NULL_TREE);
cleanup_type = build_pointer_type (tmp);
}
@@ -686,11 +686,9 @@ build_throw (tree exp)
{
/* Declare void __cxa_throw (void*, void*, void (*)(void*)). */
/* ??? Second argument is supposed to be "std::type_info*". */
- tmp = void_list_node;
- tmp = tree_cons (NULL_TREE, cleanup_type, tmp);
- tmp = tree_cons (NULL_TREE, ptr_type_node, tmp);
- tmp = tree_cons (NULL_TREE, ptr_type_node, tmp);
- tmp = build_function_type (void_type_node, tmp);
+ tmp = build_function_type_list (void_type_node,
+ ptr_type_node, ptr_type_node,
+ cleanup_type, NULL_TREE);
fn = push_throw_library_fn (fn, tmp);
}
@@ -808,7 +806,7 @@ build_throw (tree exp)
{
/* Declare void __cxa_rethrow (void). */
fn = push_throw_library_fn
- (fn, build_function_type (void_type_node, void_list_node));
+ (fn, build_function_type_list (void_type_node, NULL_TREE));
}
/* ??? Indicate that this function call allows exceptions of the type