aboutsummaryrefslogtreecommitdiff
path: root/gcc/except.c
diff options
context:
space:
mode:
authorSteven Bosscher <steven@gcc.gnu.org>2010-06-28 10:52:46 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2010-06-28 10:52:46 +0000
commita8d33d41d32ce2bb74ca82a5b66b40b99274f56c (patch)
treee5d19eb8eea815fc1117fd2ff13d0744588da0cb /gcc/except.c
parent02faa14c504ad47a04261f226e6414d204db345c (diff)
gcc/ChangeLog:
2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * system.h: Poison GCC_EXCEPT_H for front-end files. * langhooks.h (struct lang_hooks): Add eh_protect_cleanup_actions langhook. * langhooks-def.h (LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS) New. Define to NULL by default. * except.h: Define GCC_EXCEPT_H. (doing_eh): Remove prototype. (init_eh, init_eh_for_function): Move prototypes to toplev.h. (lang_protect_cleanup_actions): Remove. * except.c (lang_protect_cleanup_actions): Remove. (doing_eh): Remove. (gen_eh_region): Don't check doing_eh here. * toplev.h (init_eh, init_eh_for_function_): Moved from except.h. * tree-eh.c (honor_protect_cleanup_actions): Use new langhook instead of lang_protect_cleanup_actions. * omp-low.c (maybe_catch_exception): Likewise. * Makefile.in: Update dependencies. gcc/c-family/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * c-cppbuiltin.c: Do not include except.h. gcc/objc/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * objc-act.c: Do not include except.h. gcc/cp/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * init.c: Do not include except.h. * decl.c: Likewise. * expr.c: Likewise. * cp-lang.c: Likewise. * pt.c: Likewise. * semantics.c: Likewise. * decl2.c: Likewise. * except.c: Likewise. (init_exception_processing): Do not set the removed lang_protect_cleanup_actions here. (cp_protect_cleanup_actions): Make non-static and remove prototype. (doing_eh): New, moved from except.c but removed the do_warning flag. (expand_start_catch_block): Update doing_eh call. (expand_end_catch_block): Likewise. (build_throw): Likewise. * cp-tree.h: Prototype cp_protect_cleanup_actions. * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to cp_protect_cleanup_actions. * Make-lang.in: Update dependencies. gcc/objcp/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * objcp-lang.c: Do not include except.h. * Make-lang.in: Update dependencies. gcc/java/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * lang.c: Do not include except.h * except.c: Likewise. (doing_eh): New, moved from except.c (in gcc/) but removed the do_warning flag. (maybe_start_try): Update doing_eh call. * Make-lang.in: Update dependencies. gcc/ada/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * gcc-interface/misc.c: Do not include except.h. * gcc-interface/Make-lang.in: Update dependencies. gcc/fortran/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * Make-lang.in: Update dependencies. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@161484 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/except.c')
-rw-r--r--gcc/except.c34
1 files changed, 1 insertions, 33 deletions
diff --git a/gcc/except.c b/gcc/except.c
index 16a02473a12..285d4a657e8 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -40,7 +40,7 @@ along with GCC; see the file COPYING3. If not see
During pass_lower_eh (tree-eh.c) we record the nested structure
of the TRY nodes in EH_REGION nodes in CFUN->EH->REGION_TREE.
- We expand the lang_protect_cleanup_actions hook into MUST_NOT_THROW
+ We expand the eh_protect_cleanup_actions langhook into MUST_NOT_THROW
regions at this time. We can then flatten the statements within
the TRY nodes to straight-line code. Statements that had been within
TRY nodes that can throw are recorded within CFUN->EH->THROW_STMT_TABLE,
@@ -150,10 +150,6 @@ along with GCC; see the file COPYING3. If not see
#define EH_RETURN_DATA_REGNO(N) INVALID_REGNUM
#endif
-/* Protect cleanup actions with must-not-throw regions, with a call
- to the given failure handler. */
-tree (*lang_protect_cleanup_actions) (void);
-
static GTY(()) int call_site_base;
static GTY ((param_is (union tree_node)))
htab_t type_to_runtime_map;
@@ -203,30 +199,6 @@ static void dw2_output_call_site_table (int, int);
static void sjlj_output_call_site_table (void);
-/* Routine to see if exception handling is turned on.
- DO_WARN is nonzero if we want to inform the user that exception
- handling is turned off.
-
- This is used to ensure that -fexceptions has been specified if the
- compiler tries to use any exception-specific functions. */
-
-int
-doing_eh (int do_warn)
-{
- if (! flag_exceptions)
- {
- static int warned = 0;
- if (! warned && do_warn)
- {
- error ("exception handling disabled, use -fexceptions to enable");
- warned = 1;
- }
- return 0;
- }
- return 1;
-}
-
-
void
init_eh (void)
{
@@ -345,10 +317,6 @@ gen_eh_region (enum eh_region_type type, eh_region outer)
{
eh_region new_eh;
-#ifdef ENABLE_CHECKING
- gcc_assert (doing_eh (0));
-#endif
-
/* Insert a new blank region as a leaf in the tree. */
new_eh = ggc_alloc_cleared_eh_region_d ();
new_eh->type = type;