]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
system.h: Poison GCC_EXCEPT_H for front-end files.
authorSteven Bosscher <steven@gcc.gnu.org>
Mon, 28 Jun 2010 10:52:46 +0000 (10:52 +0000)
committerSteven Bosscher <steven@gcc.gnu.org>
Mon, 28 Jun 2010 10:52:46 +0000 (10:52 +0000)
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.

From-SVN: r161484

38 files changed:
gcc/ChangeLog
gcc/Makefile.in
gcc/ada/ChangeLog
gcc/ada/gcc-interface/Make-lang.in
gcc/ada/gcc-interface/misc.c
gcc/c-family/ChangeLog
gcc/c-family/c-cppbuiltin.c
gcc/cp/ChangeLog
gcc/cp/Make-lang.in
gcc/cp/cp-lang.c
gcc/cp/cp-objcp-common.h
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/except.c
gcc/cp/expr.c
gcc/cp/init.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/except.c
gcc/except.h
gcc/fortran/ChangeLog
gcc/fortran/Make-lang.in
gcc/java/ChangeLog
gcc/java/Make-lang.in
gcc/java/except.c
gcc/java/lang.c
gcc/langhooks-def.h
gcc/langhooks.h
gcc/objc/ChangeLog
gcc/objc/objc-act.c
gcc/objcp/ChangeLog
gcc/objcp/Make-lang.in
gcc/objcp/objcp-lang.c
gcc/omp-low.c
gcc/system.h
gcc/toplev.h
gcc/tree-eh.c

index fef5c987ba25393a9e2d177e1fda88a377fc934b..7b5976187e9fa7f8c7f1a02b7b6713c28d816ec9 100644 (file)
@@ -1,3 +1,24 @@
+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.
+
 2010-06-28  Bingfeng Mei <bmei@broadcom.com>
 
         * cgraph.h (struct varpool_node): new used_from_object_file flag.
index 2075cf3360edf6a47a43e9e6f005bd7654a74f93..aa3f74d2683169b9452d5caf3160fe93e2c45f4f 100644 (file)
@@ -2081,7 +2081,7 @@ c-family/c-common.o : c-family/c-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
 
 c-family/c-cppbuiltin.o : c-family/c-cppbuiltin.c $(CONFIG_H) $(SYSTEM_H) \
        coretypes.h $(TM_H) $(TREE_H) version.h $(C_COMMON_H) $(C_PRAGMA_H) \
-       $(FLAGS_H) $(TOPLEV_H) output.h $(EXCEPT_H) $(TREE_H) $(TARGET_H) \
+       $(FLAGS_H) $(TOPLEV_H) output.h $(TREE_H) $(TARGET_H) \
        $(TM_P_H) $(BASEVER) debug.h $(CPP_ID_DATA_H)
        $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
                -DBASEVER=$(BASEVER_s) $< $(OUTPUT_OPTION)
@@ -2283,26 +2283,26 @@ lto-cgraph.o: lto-cgraph.c $(CONFIG_H) $(SYSTEM_H) coretypes.h   \
    $(TM_H) $(TOPLEV_H) $(EXPR_H) $(FLAGS_H) $(PARAMS_H) input.h \
    $(HASHTAB_H) langhooks.h $(BASIC_BLOCK_H) \
    $(TREE_FLOW_H) $(CGRAPH_H) $(FUNCTION_H) $(GGC_H) $(DIAGNOSTIC_CORE_H) \
-   except.h $(TIMEVAR_H) output.h pointer-set.h $(LTO_STREAMER_H) $(GCOV_IO_H)
+   $(EXCEPT_H) $(TIMEVAR_H) output.h pointer-set.h $(LTO_STREAMER_H) $(GCOV_IO_H)
 lto-streamer-in.o: lto-streamer-in.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TM_H) $(TOPLEV_H) $(EXPR_H) $(FLAGS_H) $(PARAMS_H) input.h \
    $(HASHTAB_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(TREE_PASS_H) $(CGRAPH_H) \
    $(FUNCTION_H) $(GGC_H) $(DIAGNOSTIC_H) libfuncs.h $(EXCEPT_H) debug.h \
-   $(TIMEVAR_H) output.h $(IPA_UTILS_H) $(LTO_STREAMER_H)
+   $(TIMEVAR_H) output.h $(IPA_UTILS_H) $(LTO_STREAMER_H) toplev.h
 lto-streamer-out.o : lto-streamer-out.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TM_H) $(TOPLEV_H) $(TREE_H) $(EXPR_H) $(FLAGS_H) $(PARAMS_H) input.h \
    $(HASHTAB_H) $(BASIC_BLOCK_H) tree-iterator.h \
    $(TREE_FLOW_H) $(TREE_PASS_H) $(CGRAPH_H) $(FUNCTION_H) $(GGC_H) \
-   $(DIAGNOSTIC_CORE_H) except.h $(LTO_STREAMER_H) $(TOPLEV_H)
+   $(DIAGNOSTIC_CORE_H) $(EXCEPT_H) $(LTO_STREAMER_H) $(TOPLEV_H)
 lto-section-in.o: lto-section-in.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
    $(TOPLEV_H) $(EXPR_H) $(FLAGS_H) $(PARAMS_H) input.h \
    $(HASHTAB_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(CGRAPH_H) $(FUNCTION_H) \
-   $(GGC_H) $(DIAGNOSTIC_CORE_H) except.h $(TIMEVAR_H) output.h \
+   $(GGC_H) $(DIAGNOSTIC_CORE_H) $(EXCEPT_H) $(TIMEVAR_H) output.h \
    $(LTO_STREAMER_H) lto-compress.h
 lto-section-out.o : lto-section-out.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TM_H) $(TOPLEV_H) $(TREE_H) $(EXPR_H) $(PARAMS_H) input.h \
    $(HASHTAB_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(TREE_PASS_H) \
-   $(CGRAPH_H) $(FUNCTION_H) $(GGC_H) except.h pointer-set.h \
+   $(CGRAPH_H) $(FUNCTION_H) $(GGC_H) $(EXCEPT_H) pointer-set.h \
    $(BITMAP_H) langhooks.h $(LTO_STREAMER_H) lto-compress.h
 lto-symtab.o: lto-symtab.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    toplev.h $(TREE_H) $(GIMPLE_H) $(GGC_H) $(LAMBDA_H) $(HASHTAB_H) \
@@ -4419,7 +4419,7 @@ PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
   $(host_xm_file_list) $(host_xm_include_list) $(xm_include_list) \
   intl.h $(PLUGIN_VERSION_H) $(DIAGNOSTIC_H) $(C_COMMON_H) $(C_PRETTY_PRINT_H) \
   tree-iterator.h $(PLUGIN_H) $(TREE_FLOW_H) langhooks.h incpath.h debug.h \
-  except.h tree-ssa-sccvn.h real.h output.h $(IPA_UTILS_H) \
+  $(EXCEPT_H) tree-ssa-sccvn.h real.h output.h $(IPA_UTILS_H) \
   $(C_PRAGMA_H)  $(CPPLIB_H)  $(FUNCTION_H) \
   cppdefault.h flags.h $(MD5_H) params.def params.h prefix.h tree-inline.h \
   $(IPA_PROP_H) $(RTL_H) $(TM_P_H) $(CFGLOOP_H) $(EMIT_RTL_H) version.h
index 1c702a4e216c805d82cb54791f2d4a1673507d0d..4046a3a1e8966883e1259ae9e6d15c56e0c92b6e 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 2010-06-27  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/trans.c: Include tree-flow.h.
index d4f37fe53744f615317fa7e57e9dc2df49450fe8..095ae08bbad2eb97ff805514dff6833263a7fd9a 100644 (file)
@@ -1244,7 +1244,7 @@ ada/decl.o : ada/gcc-interface/decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
 
 ada/misc.o : ada/gcc-interface/misc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TM_H) $(TREE_H) $(DIAGNOSTIC_H) $(TARGET_H) $(FUNCTION_H) \
-   $(FLAGS_H) debug.h toplev.h $(EXCEPT_H) langhooks.h \
+   $(FLAGS_H) debug.h toplev.h langhooks.h \
    $(LANGHOOKS_DEF_H) opts.h options.h $(TREE_INLINE_H) $(PLUGIN_H) \
    ada/gcc-interface/ada.h ada/adadecode.h ada/types.h ada/atree.h \
    ada/elists.h ada/namet.h ada/nlists.h ada/stringt.h ada/uintp.h ada/fe.h \
index 3716f1a631f7b1c9ac5869ab0f5aca6f1f55079f..4033173d78249556215ec731045094460ab9caa5 100644 (file)
@@ -25,7 +25,7 @@
 
 /* This file contains parts of the compiler that are required for interfacing
    with GCC but otherwise do nothing and parts of Gigi that need to know
-   about RTL.  */
+   about GIMPLE.  */
 
 #include "config.h"
 #include "system.h"
@@ -44,7 +44,6 @@
 #include "options.h"
 #include "plugin.h"
 #include "function.h"  /* For pass_by_reference.  */
-#include "except.h"    /* For USING_SJLJ_EXCEPTIONS.  */
 
 #include "ada.h"
 #include "adadecode.h"
index 0d54b2d01fc0f453f008dd072209cfa7ac1b3336..5b575ee1b3d791aa7f8b5d1ed515eb076ee70266 100644 (file)
@@ -1,3 +1,7 @@
+2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
+
+       * c-cppbuiltin.c: Do not include except.h.
+
 2010-06-24  Andi Kleen  <ak@linux.intel.com>
 
         * c-common.c (warn_for_omitted_condop): New.
index 1105ce59f8190c5c4ea8a42168dbfe50e11e4424..fbace227195b29303cb85bd8a5a17bea5462c9e5 100644 (file)
@@ -28,7 +28,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "c-common.h"
 #include "c-pragma.h"
 #include "output.h"
-#include "except.h"            /* For USING_SJLJ_EXCEPTIONS.  */
 #include "debug.h"             /* For dwarf2out_do_cfi_asm.  */
 #include "toplev.h"
 #include "tm_p.h"              /* For TARGET_CPU_CPP_BUILTINS & friends.  */
index e9d85c30ffe19d8a077a21bd45218d8d0dc4742b..3b5f1bd82de5c26262f86b9a25bf6a5c94137d8d 100644 (file)
@@ -1,3 +1,25 @@
+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.
+
 2010-06-26  Jason Merrill  <jason@redhat.com>
 
        * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
index bfccd72d5d8231461f2b933dd2d9183109ba3aab..f664c78f12f580afe3c1135a9bc0d3de0a96210f 100644 (file)
@@ -249,14 +249,14 @@ cp/lex.o: cp/lex.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) \
   $(C_PRAGMA_H) toplev.h output.h input.h cp/operators.def $(TM_P_H)
 cp/cp-lang.o: cp/cp-lang.c $(CXX_TREE_H) $(TM_H) toplev.h debug.h langhooks.h \
   $(LANGHOOKS_DEF_H) $(C_COMMON_H) gtype-cp.h gt-cp-cp-lang.h \
-  cp/cp-objcp-common.h $(EXPR_H) $(EXCEPT_H)
+  cp/cp-objcp-common.h $(EXPR_H)
 cp/decl.o: cp/decl.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) cp/decl.h \
-  output.h $(EXCEPT_H) toplev.h $(HASHTAB_H) $(RTL_H) \
+  output.h toplev.h $(HASHTAB_H) $(RTL_H) \
   cp/operators.def $(TM_P_H) $(TREE_INLINE_H) $(DIAGNOSTIC_H) $(C_PRAGMA_H) \
   debug.h gt-cp-decl.h $(TIMEVAR_H) $(TREE_FLOW_H) $(TARGET_H) $(PLUGIN_H) \
   intl.h tree-iterator.h $(SPLAY_TREE_H)
 cp/decl2.o: cp/decl2.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) cp/decl.h \
-  output.h $(EXCEPT_H) toplev.h $(C_COMMON_H) gt-cp-decl2.h $(CGRAPH_H) \
+  output.h toplev.h $(C_COMMON_H) gt-cp-decl2.h $(CGRAPH_H) \
   $(C_PRAGMA_H) $(TREE_DUMP_H) intl.h $(TARGET_H) $(GIMPLE_H) $(POINTER_SET_H) \
   $(SPLAY_TREE_H) c-family/c-ada-spec.h
 cp/cp-objcp-common.o : cp/cp-objcp-common.c $(CONFIG_H) $(SYSTEM_H) \
@@ -288,19 +288,17 @@ cp/tree.o: cp/tree.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) toplev.h \
 cp/ptree.o: cp/ptree.c $(CXX_TREE_H) $(TM_H)
 cp/rtti.o: cp/rtti.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) toplev.h convert.h \
   $(TARGET_H) $(C_PRAGMA_H) gt-cp-rtti.h intl.h
-cp/except.o: cp/except.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) $(EXCEPT_H) \
+cp/except.o: cp/except.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) \
   toplev.h cp/cfns.h $(TREE_INLINE_H) $(TARGET_H)
-cp/expr.o: cp/expr.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) \
-  toplev.h $(EXCEPT_H) $(TM_P_H)
+cp/expr.o: cp/expr.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) toplev.h $(TM_P_H)
 cp/pt.o: cp/pt.c $(CXX_TREE_H) $(TM_H) cp/decl.h cp/cp-objcp-common.h \
-  toplev.h $(EXCEPT_H) $(TREE_INLINE_H) pointer-set.h gt-cp-pt.h \
-  vecprim.h intl.h
+  toplev.h $(TREE_INLINE_H) pointer-set.h gt-cp-pt.h vecprim.h intl.h
 cp/error.o: cp/error.c $(CXX_TREE_H) $(TM_H) toplev.h $(DIAGNOSTIC_H) \
   $(FLAGS_H) $(REAL_H) $(LANGHOOKS_DEF_H) $(CXX_PRETTY_PRINT_H) \
   tree-diagnostic.h tree-pretty-print.h
 cp/repo.o: cp/repo.c $(CXX_TREE_H) $(TM_H) toplev.h $(DIAGNOSTIC_CORE_H) \
   gt-cp-repo.h
-cp/semantics.o: cp/semantics.c $(CXX_TREE_H) $(TM_H) $(EXCEPT_H) toplev.h \
+cp/semantics.o: cp/semantics.c $(CXX_TREE_H) $(TM_H) toplev.h \
   $(FLAGS_H) output.h $(RTL_H) $(TIMEVAR_H) \
   $(TREE_INLINE_H) $(CGRAPH_H) $(TARGET_H) $(C_COMMON_H) $(GIMPLE_H) \
   bitmap.h gt-cp-semantics.h
index 541e9adcdeb85bd7269e955751775315bc786176..fb687b81685f6d0733669e8e4f68f7864ebc8673 100644 (file)
@@ -32,7 +32,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "debug.h"
 #include "cp-objcp-common.h"
 #include "hashtab.h"
-#include "except.h"
 
 enum c_language_kind c_language = clk_cxx;
 static void cp_init_ts (void);
index 1a97ad2b1190e92f31fe5c656aebbcccefd17a82..f2d4aa1cceb85c5c7bd6b6b9e6722c12e180e859 100644 (file)
@@ -143,4 +143,7 @@ extern bool cp_function_decl_explicit_p (tree decl);
 #undef LANG_HOOKS_EH_USE_CXA_END_CLEANUP
 #define LANG_HOOKS_EH_USE_CXA_END_CLEANUP true
 
+#undef LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS
+#define LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS cp_protect_cleanup_actions
+
 #endif /* GCC_CP_OBJCP_COMMON */
index f63ec2e795c12d3993f7f72ba4a5c59654ae3362..285dac73c81c95cf92f42e35a32a2c4e6d6bd0b7 100644 (file)
@@ -4855,6 +4855,7 @@ extern tree eh_type_info                  (tree);
 extern tree begin_eh_spec_block                        (void);
 extern void finish_eh_spec_block               (tree, tree);
 extern tree build_eh_type_type                 (tree);
+extern tree cp_protect_cleanup_actions         (void);
 
 /* in expr.c */
 extern tree cplus_expand_constant              (tree);
index 9541252125aa78999d51405d28c50818f3e456e1..48d2b69075291b5f95bcd0bf881e80f0b76b7ff1 100644 (file)
@@ -40,7 +40,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "decl.h"
 #include "intl.h"
 #include "output.h"
-#include "except.h"
 #include "toplev.h"
 #include "hashtab.h"
 #include "tm_p.h"
index 691c1dbc0f3d284b7e8fd030380cd7b2a7724fe0..1e088e0464ac622dd92092356d5d40428d156415 100644 (file)
@@ -37,7 +37,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "cp-tree.h"
 #include "decl.h"
 #include "output.h"
-#include "except.h"
 #include "toplev.h"
 #include "timevar.h"
 #include "cpplib.h"
index 64f417154ce399b3bdb9f0ab71ec9ecc63df86a7..79bab76cc5a3a9df1e4767d7cb96b5bb7e31b552 100644 (file)
@@ -31,7 +31,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "cp-tree.h"
 #include "flags.h"
 #include "output.h"
-#include "except.h"
 #include "toplev.h"
 #include "tree-inline.h"
 #include "tree-iterator.h"
@@ -50,7 +49,6 @@ static tree wrap_cleanups_r (tree *, int *, void *);
 static int complete_ptr_ref_or_void_ptr_p (tree, tree);
 static bool is_admissible_throw_operand (tree);
 static int can_convert_eh (tree, tree);
-static tree cp_protect_cleanup_actions (void);
 
 /* Sets up all the global eh stuff that needs to be initialized at the
    start of compilation.  */
@@ -72,14 +70,12 @@ init_exception_processing (void)
   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);
-
-  lang_protect_cleanup_actions = &cp_protect_cleanup_actions;
 }
 
 /* Returns an expression to be executed if an unhandled exception is
    propagated out of a cleanup region.  */
 
-static tree
+tree
 cp_protect_cleanup_actions (void)
 {
   /* [except.terminate]
@@ -407,6 +403,30 @@ initialize_handler_parm (tree decl, tree exp)
                  LOOKUP_ONLYCONVERTING|DIRECT_BIND);
 }
 
+\f
+/* 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.  */
+
+static inline int
+doing_eh (void)
+{
+  if (! flag_exceptions)
+    {
+      static int warned = 0;
+      if (! warned)
+       {
+         error ("exception handling disabled, use -fexceptions to enable");
+         warned = 1;
+       }
+      return 0;
+    }
+  return 1;
+}
+
 /* Call this to start a catch block.  DECL is the catch parameter.  */
 
 tree
@@ -415,7 +435,7 @@ expand_start_catch_block (tree decl)
   tree exp;
   tree type, init;
 
-  if (! doing_eh (1))
+  if (! doing_eh ())
     return NULL_TREE;
 
   /* Make sure this declaration is reasonable.  */
@@ -494,7 +514,7 @@ expand_start_catch_block (tree decl)
 void
 expand_end_catch_block (void)
 {
-  if (! doing_eh (1))
+  if (! doing_eh ())
     return;
 
   /* The exception being handled is rethrown if control reaches the end of
@@ -641,7 +661,7 @@ build_throw (tree exp)
        return error_mark_node;
     }
 
-  if (! doing_eh (1))
+  if (! doing_eh ())
     return error_mark_node;
 
   if (exp && decl_is_java_type (TREE_TYPE (exp), 1))
index 0a0ba534063cfc808ed225a29ce2b128ee68aa91..681834d9a377cfa77d6ee803c3ccebd6afa0744e 100644 (file)
@@ -28,7 +28,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "flags.h"
 #include "cp-tree.h"
 #include "toplev.h"
-#include "except.h"
 #include "tm_p.h"
 
 /* Expand C++-specific constants.  Currently, this means PTRMEM_CST.  */
index 84e486cea466f78e9ce45b7c7881369d8f5adf04..30808b233cea2f8f159132e127bdd25c1d430749 100644 (file)
@@ -30,7 +30,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "cp-tree.h"
 #include "flags.h"
 #include "output.h"
-#include "except.h"
 #include "toplev.h"
 #include "target.h"
 
index b97d3f5cc09a0a1fca4c7046678db37ab074137e..863218d68a90e354079bee7d34738410304c4ff1 100644 (file)
@@ -40,7 +40,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-inline.h"
 #include "decl.h"
 #include "output.h"
-#include "except.h"
 #include "toplev.h"
 #include "timevar.h"
 #include "tree-iterator.h"
index 4869cfc47e9ed1be3f7d58c7ac28a820baefd8af..e750937dfe1bb52d1665819b8493f1e5f691c8fb 100644 (file)
@@ -33,7 +33,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "c-family/c-common.h"
 #include "tree-inline.h"
 #include "tree-mudflap.h"
-#include "except.h"
 #include "toplev.h"
 #include "flags.h"
 #include "output.h"
index 16a02473a12bc6028114ebe822a0786b276c111b..285d4a657e805b416b0b03c08a455d148104038c 100644 (file)
@@ -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;
@@ -202,30 +198,6 @@ static int sjlj_size_of_call_site_table (void);
 static void dw2_output_call_site_table (int, int);
 static void sjlj_output_call_site_table (void);
 
-\f
-/* 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;
-}
-
 \f
 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;
index 068a444c9b1425946768cced468672071f5bd8d0..72fd76ef646a66867b5845795e5fa55e5fec1003 100644 (file)
@@ -19,6 +19,13 @@ You should have received a copy of the GNU General Public License
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
+/* No include guards here, but define an include file marker anyway, so
+   that the compiler can keep track of where this file is included.  This
+   is e.g. used to avoid including this file in front-end specific files.  */
+#ifndef GCC_EXCEPT_H
+#  define GCC_EXCEPT_H
+#endif
+
 #include "hashtab.h"
 #include "vecprim.h"
 #include "vecir.h"
@@ -222,14 +229,10 @@ struct GTY(()) eh_status
 };
 
 
-/* Test: is exception handling turned on?  */
-extern int doing_eh (int);
-
 /* Invokes CALLBACK for every exception handler label.  Only used by old
    loop hackery; should not be used by new code.  */
 extern void for_each_eh_label (void (*) (rtx));
 
-extern void init_eh (void);
 extern void init_eh_for_function (void);
 
 extern void remove_eh_landing_pad (eh_landing_pad);
@@ -287,14 +290,6 @@ extern void assign_filter_values (void);
 extern eh_region get_eh_region_from_rtx (const_rtx);
 extern eh_landing_pad get_eh_landing_pad_from_rtx (const_rtx);
 
-/* If non-NULL, this is a function that returns a function decl to be
-   executed if an unhandled exception is propagated out of a cleanup
-   region.  For example, in C++, an exception thrown by a destructor
-   during stack unwinding is required to result in a call to
-   `std::terminate', so the C++ version of this function returns a
-   FUNCTION_DECL for `std::terminate'.  */
-extern tree (*lang_protect_cleanup_actions) (void);
-
 struct GTY(()) throw_stmt_node {
   gimple stmt;
   int lp_nr;
index d58299dc4d59abb659d739f096df5e8870afd86f..fc8445c784dfa71fa87173bb5a52841eadc31b6f 100644 (file)
@@ -1,3 +1,7 @@
+2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
+
+       * Make-lang.in: Update dependencies.
+
 2010-06-27  Nathan Froyd  <froydnj@codesourcery.com>
 
        * gfortran.h (gfc_code): Split backend_decl field into cycle_label
index b74f9e99d0bd1b22b339b98db67617802fe2543b..2a8c791c445e6b005cc3e18a5162a9472a09cfa0 100644 (file)
@@ -336,7 +336,7 @@ GFORTRAN_TRANS_DEPS = fortran/gfortran.h fortran/libgfortran.h \
 fortran/f95-lang.o: $(GFORTRAN_TRANS_DEPS) fortran/mathbuiltins.def \
   gt-fortran-f95-lang.h gtype-fortran.h $(CGRAPH_H) $(TARGET_H) fortran/cpp.h \
   $(BUILTINS_DEF) fortran/types.def \
-  libfuncs.h expr.h except.h
+  libfuncs.h expr.h
 fortran/scanner.o: toplev.h fortran/cpp.h
 fortran/convert.o: $(GFORTRAN_TRANS_DEPS)
 fortran/trans.o: $(GFORTRAN_TRANS_DEPS) tree-iterator.h
index e1135318f1bd3b79350b02d229f0ae97fdba278d..0d50a7f44393fff20fc9ee8c5c0494d169b22670 100644 (file)
@@ -1,3 +1,12 @@
+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.
+
 2010-06-23  Anatoly Sokolov  <aesok@post.ru>
 
        * decl.c (java_init_decl_processing): Use double_int_to_tree instead
index 26a81bab79a586c3dce31a973acf27df2bba1356..5e240ed0743d4acd0324dc30cdec47dca0d40987 100644 (file)
@@ -285,7 +285,7 @@ java/decl.o: java/decl.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \
   libfuncs.h java/java-except.h $(GGC_H) $(REAL_H) gt-java-decl.h \
   $(TARGET_H) $(CGRAPH_H) langhooks.h
 java/except.o: java/except.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h $(REAL_H) \
-  java/javaop.h java/java-opcodes.h except.h java/java-except.h \
+  java/javaop.h java/java-opcodes.h java/java-except.h \
   toplev.h $(SYSTEM_H) coretypes.h
 java/expr.o: java/expr.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h $(REAL_H) \
   java/javaop.h java/java-opcodes.h \
@@ -302,7 +302,7 @@ java/jvgenmain.o: java/jvgenmain.c $(CONFIG_H) $(JAVA_TREE_H) $(SYSTEM_H) \
   coretypes.h $(TM_H) intl.h
 java/lang.o: java/lang.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h input.h \
   toplev.h $(SYSTEM_H) coretypes.h $(TM_H) $(DIAGNOSTIC_H) \
-  langhooks.h $(LANGHOOKS_DEF_H) gt-java-lang.h opts.h options.h $(EXCEPT_H)
+  langhooks.h $(LANGHOOKS_DEF_H) gt-java-lang.h opts.h options.h
 java/mangle.o: java/mangle.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) $(SYSTEM_H) \
   coretypes.h $(TM_H) toplev.h $(GGC_H) gt-java-mangle.h $(LANGHOOKS_DEF_H)
 java/mangle_name.o: java/mangle_name.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) \
index f5a64071204fde0ee8cb9a6d71c6a70607576c29..2c3aead1a4cc42f046b0cbf04359f2230073da59 100644 (file)
@@ -31,7 +31,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc.  */
 #include "javaop.h"
 #include "java-opcodes.h"
 #include "jcf.h"
-#include "except.h"    /* for doing_eh.  */
 #include "java-except.h"
 #include "toplev.h"
 #include "tree-iterator.h"
@@ -565,6 +564,29 @@ check_start_handlers (struct eh_range *range, int pc)
 }
 
 
+/* 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.  */
+
+static inline int
+doing_eh (void)
+{
+  if (! flag_exceptions)
+    {
+      static int warned = 0;
+      if (! warned)
+       {
+         error ("exception handling disabled, use -fexceptions to enable");
+         warned = 1;
+       }
+      return 0;
+    }
+  return 1;
+}
+
 static struct eh_range *current_range;
 
 /* Emit any start-of-try-range starting at start_pc and ending after
@@ -574,7 +596,7 @@ void
 maybe_start_try (int start_pc, int end_pc)
 {
   struct eh_range *range;
-  if (! doing_eh (1))
+  if (! doing_eh ())
     return;
 
   range = find_handler (start_pc);
index 351952de1a6cbf7bdf3bb33a015bea543296763e..6c31947c6a492cf2171c9660c8ddb74ca6a0c392 100644 (file)
@@ -43,7 +43,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc.  */
 #include "tree-dump.h"
 #include "opts.h"
 #include "options.h"
-#include "except.h"    /* For USING_SJLJ_EXCEPTIONS.  */
 
 static bool java_init (void);
 static void java_finish (void);
index 92755e24880b8992e1556d88533b0c00dacdb125..68085c72c9ef7bca8dc838f11267f70a88d8898f 100644 (file)
@@ -110,6 +110,7 @@ extern void lhd_omp_firstprivatize_type_sizes (struct gimplify_omp_ctx *,
 #define LANG_HOOKS_INIT_TS             lhd_do_nothing
 #define LANG_HOOKS_EH_PERSONALITY      lhd_gcc_personality
 #define LANG_HOOKS_EH_RUNTIME_TYPE     lhd_pass_through_t
+#define LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS  NULL
 #define LANG_HOOKS_EH_USE_CXA_END_CLEANUP      false
 #define LANG_HOOKS_DEEP_UNSHARING      false
 
@@ -299,6 +300,7 @@ extern void lhd_end_section (void);
   LANG_HOOKS_EXPR_TO_DECL, \
   LANG_HOOKS_EH_PERSONALITY, \
   LANG_HOOKS_EH_RUNTIME_TYPE, \
+  LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS, \
   LANG_HOOKS_EH_USE_CXA_END_CLEANUP, \
   LANG_HOOKS_DEEP_UNSHARING \
 }
index 535529a08f01dc86651f9b465c40e7693c257397..483a8dcdd7728063489e8d0afdbf8b5e7a371120 100644 (file)
@@ -446,6 +446,14 @@ struct lang_hooks
   /* Map a type to a runtime object to match type.  */
   tree (*eh_runtime_type) (tree);
 
+  /* If non-NULL, this is a function that returns a function decl to be
+     executed if an unhandled exception is propagated out of a cleanup
+     region.  For example, in C++, an exception thrown by a destructor
+     during stack unwinding is required to result in a call to
+     `std::terminate', so the C++ version of this function returns a
+     FUNCTION_DECL for `std::terminate'.  */
+  tree (*eh_protect_cleanup_actions) (void);
+
   /* True if this language uses __cxa_end_cleanup when the ARM EABI
      is enabled.  */
   bool eh_use_cxa_end_cleanup;
index a05a140c7cbebfd8a69cc0512c542123279ac73d..099bc6595acf0a4823bd31d65706a0c5839b2ba2 100644 (file)
@@ -1,3 +1,7 @@
+2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
+
+       * objc-act.c: Do not include except.h.
+
 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
 
        * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC
index 2ec9ca04009caf4a8dd0a94f874c80619c638937..45b1020762914b1d642fe6a6585a742b9b77c80b 100644 (file)
@@ -59,7 +59,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "objc-act.h"
 #include "input.h"
-#include "except.h"    /* For USING_SJLJ_EXCEPTIONS.  */
 #include "function.h"
 #include "output.h"
 #include "toplev.h"
index cfb27f413cd3742388d83df3de539e58862b1f90..109d2327ed6c306183451b803824cf2d2eb0ae7b 100644 (file)
@@ -1,3 +1,8 @@
+2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
+
+       * objcp-lang.c: Do not include except.h.
+       * Make-lang.in: Update dependencies.
+
 2010-06-25  Joseph Myers  <joseph@codesourcery.com>
 
        * lang-specs.h: Remove +e handling.
index 873b9080ebfee7147aede14bc244aa48053e0962..22dc30f366ef39092e3ed3f99f127f2a4a8eef0d 100644 (file)
@@ -73,7 +73,7 @@ cc1objplus$(exeext): $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) $(LIBDEPS)
 objcp/objcp-lang.o : objcp/objcp-lang.c \
   $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(CXX_TREE_H) \
   $(C_COMMON_H) $(LANGHOOKS_DEF_H) objc/objc-act.h cp/cp-objcp-common.h \
-  gtype-objcp.h $(EXCEPT_H)
+  gtype-objcp.h
 
 objcp/objcp-decl.o : objcp/objcp-decl.c \
    $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(CXX_TREE_H) \
index 91e5c7e693cf1331fbbe7cede528daafb5960103..70a605bb87e35dfd2d19171361e356f319454d72 100644 (file)
@@ -30,7 +30,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "langhooks-def.h"
 #include "cp-objcp-common.h"
-#include "except.h"    /* For USING_SJLJ_EXCEPTIONS.  */
 
 enum c_language_kind c_language = clk_objcxx;
 static void objcxx_init_ts (void);
index 52ecd0fbe48ed100ea017b0c496f4e2cf76de688..53309ad02a90c2bd6dfca6e58daa7ac80bda01f9 100644 (file)
@@ -3112,8 +3112,8 @@ maybe_catch_exception (gimple_seq body)
   if (!flag_exceptions)
     return body;
 
-  if (lang_protect_cleanup_actions)
-    decl = lang_protect_cleanup_actions ();
+  if (lang_hooks.eh_protect_cleanup_actions != NULL)
+    decl = lang_hooks.eh_protect_cleanup_actions ();
   else
     decl = built_in_decls[BUILT_IN_TRAP];
 
index 256ebb1f5024c07aba3bae7aa55d2a56080de947..af3dd3a64e7d863032bbfb1294345440e42e257c 100644 (file)
@@ -799,7 +799,7 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
 /* Front ends should never have to include middle-end headers.  Enforce
    this by poisoning the header double-include protection defines.  */
 #ifdef IN_GCC_FRONTEND
-#pragma GCC poison GCC_RTL_H
+#pragma GCC poison GCC_RTL_H GCC_EXCEPT_H
 #endif
 
 /* Note: not all uses of the `index' token (e.g. variable names and
index a7ded4c47ad154a692bf9140747638c8b35dd73d..2424fd1769574ae0d63b926bd6ca002ea3e886db 100644 (file)
@@ -49,6 +49,11 @@ extern void init_optimization_passes (void);
 extern void finish_optimization_passes (void);
 extern bool enable_rtl_dump_file (void);
 
+/* In except.c.  Initialize exception handling.  This is used by the Ada
+   and LTO front ends to initialize EH "on demand".  See lto-streamer-in.c
+   and ada/gcc-interface/misc.c.  */
+extern void init_eh (void);
+
 extern void announce_function (tree);
 
 extern void error_for_asm (const_rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
index 872d4241dc81b4a40a4033cb49724cace17b8c5a..3a6292c1b2ffdee4b02e65805da73bc61932b6e9 100644 (file)
@@ -951,12 +951,12 @@ lower_try_finally_fallthru_label (struct leh_tf_state *tf)
   return label;
 }
 
-/* A subroutine of lower_try_finally.  If lang_protect_cleanup_actions
-   returns non-null, then the language requires that the exception path out
-   of a try_finally be treated specially.  To wit: the code within the
-   finally block may not itself throw an exception.  We have two choices here.
-   First we can duplicate the finally block and wrap it in a must_not_throw
-   region.  Second, we can generate code like
+/* A subroutine of lower_try_finally.  If the eh_protect_cleanup_actions
+   langhook returns non-null, then the language requires that the exception
+   path out of a try_finally be treated specially.  To wit: the code within
+   the finally block may not itself throw an exception.  We have two choices
+   here. First we can duplicate the finally block and wrap it in a
+   must_not_throw region.  Second, we can generate code like
 
        try {
          finally_block;
@@ -983,9 +983,9 @@ honor_protect_cleanup_actions (struct leh_state *outer_state,
   gimple x;
 
   /* First check for nothing to do.  */
-  if (lang_protect_cleanup_actions == NULL)
+  if (lang_hooks.eh_protect_cleanup_actions == NULL)
     return;
-  protect_cleanup_actions = lang_protect_cleanup_actions ();
+  protect_cleanup_actions = lang_hooks.eh_protect_cleanup_actions ();
   if (protect_cleanup_actions == NULL)
     return;