summaryrefslogtreecommitdiff
path: root/gcc/cp/except.c
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-17 18:12:27 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-17 18:12:27 +0000
commit49ee78f13998d92643029567ee7705b20a529637 (patch)
treeea2ee85a1a8e761513f6ee751bb994a2aeee2dd0 /gcc/cp/except.c
parentb52a90a73903c31a0ee6423fa3db6d6afdf780af (diff)
downloadgcc-49ee78f13998d92643029567ee7705b20a529637.tar.gz
* except.h (protect_cleanup_actions): Remove it.
(lang_protect_cleanup_actions): Declare it. * except.c (protect_cleanup_actions): Remove it. (lang_protect_cleanup_actions): New variable. (init_eh): Don't make protect_cleanup_actions a GC root. (expand_eh_region_and_cleanup): Call lang_protect_cleanup_actions. (output_function_exception_table): Remove unused `align' variable. * varasm.c (assemble_external): Abort if we have not yet opened the assembly output file. * except.c (cp_protect_cleanup_actions): New function. (init_exception_processing): Don't set protect_cleanup_actions here. Do set lang_protect_cleanup_actions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42218 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/except.c')
-rw-r--r--gcc/cp/except.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index e4f04e8dde8..6c7ede1cc50 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -49,6 +49,7 @@ static int complete_ptr_ref_or_void_ptr_p PARAMS ((tree, tree));
static bool is_admissible_throw_operand PARAMS ((tree));
static int can_convert_eh PARAMS ((tree, tree));
static void check_handlers_1 PARAMS ((tree, tree));
+static tree cp_protect_cleanup_actions PARAMS ((void));
#include "decl.h"
#include "obstack.h"
@@ -72,8 +73,6 @@ init_exception_processing ()
if (flag_honor_std)
pop_namespace ();
- protect_cleanup_actions = build_call (terminate_node, NULL_TREE);
-
/* void __cxa_call_unexpected(void *); */
tmp = tree_cons (NULL_TREE, ptr_type_node, void_list_node);
tmp = build_function_type (void_type_node, tmp);
@@ -85,8 +84,22 @@ init_exception_processing ()
: "__gxx_personality_v0");
lang_eh_runtime_type = build_eh_type_type;
+ lang_protect_cleanup_actions = &cp_protect_cleanup_actions;
}
+/* Returns an expression to be executed if an unhandled exception is
+ propogated out of a cleanup region. */
+
+static tree
+cp_protect_cleanup_actions ()
+{
+ /* [except.terminate]
+
+ When the destruction of an object during stack unwinding exits
+ using an exception ... void terminate(); is called. */
+ return build_call (terminate_node, NULL_TREE);
+}
+
static tree
prepare_eh_type (type)
tree type;