aboutsummaryrefslogtreecommitdiff
path: root/gcc/except.h
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2008-06-08 19:06:49 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2008-06-08 19:06:49 +0000
commitc427220a8caf5221617d92fd9e70a92d1f8ffe55 (patch)
treec239db95c5d9709c60ea31eb408225b5f86f7fa1 /gcc/except.h
parentcf0fd6189a81b785f9ff33be381d4f4485c972ef (diff)
downloadgcc-c427220a8caf5221617d92fd9e70a92d1f8ffe55.zip
gcc-c427220a8caf5221617d92fd9e70a92d1f8ffe55.tar.gz
gcc-c427220a8caf5221617d92fd9e70a92d1f8ffe55.tar.bz2
* except.h: Correct checks for when SJLJ exceptions must be used.
From-SVN: r136568
Diffstat (limited to 'gcc/except.h')
-rw-r--r--gcc/except.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/gcc/except.h b/gcc/except.h
index ba6f592..ae3264e 100644
--- a/gcc/except.h
+++ b/gcc/except.h
@@ -135,14 +135,14 @@ extern tree (*lang_eh_runtime_type) (tree);
has appropriate support. */
#ifndef MUST_USE_SJLJ_EXCEPTIONS
-# if !(defined (EH_RETURN_DATA_REGNO) \
+# if defined (EH_RETURN_DATA_REGNO) \
&& (defined (TARGET_UNWIND_INFO) \
|| (DWARF2_UNWIND_INFO \
&& (defined (EH_RETURN_HANDLER_RTX) \
- || defined (HAVE_eh_return)))))
-# define MUST_USE_SJLJ_EXCEPTIONS 1
-# else
+ || defined (HAVE_eh_return))))
# define MUST_USE_SJLJ_EXCEPTIONS 0
+# else
+# define MUST_USE_SJLJ_EXCEPTIONS 1
# endif
#endif
@@ -152,14 +152,21 @@ extern tree (*lang_eh_runtime_type) (tree);
# endif
# if CONFIG_SJLJ_EXCEPTIONS == 0
# define USING_SJLJ_EXCEPTIONS 0
-# ifndef EH_RETURN_DATA_REGNO
+# if !defined(EH_RETURN_DATA_REGNO)
#error "EH_RETURN_DATA_REGNO required"
# endif
-# if !defined(EH_RETURN_HANDLER_RTX) && !defined(HAVE_eh_return)
+# if ! (defined(TARGET_UNWIND_INFO) || DWARF2_UNWIND_INFO)
+ #error "{DWARF2,TARGET}_UNWIND_INFO required"
+# endif
+# if !defined(TARGET_UNWIND_INFO) \
+ && !(defined(EH_RETURN_HANDLER_RTX) || defined(HAVE_eh_return))
#error "EH_RETURN_HANDLER_RTX or eh_return required"
# endif
-# if !defined(DWARF2_UNWIND_INFO) && !defined(TARGET_UNWIND_INFO)
- #error "{DWARF2,TARGET}_UNWIND_INFO required"
+/* Usually the above error checks will have already triggered an
+ error, but backends may set MUST_USE_SJLJ_EXCEPTIONS for their own
+ reasons. */
+# if MUST_USE_SJLJ_EXCEPTIONS
+ #error "Must use SJLJ exceptions but configured not to"
# endif
# endif
#else