aboutsummaryrefslogtreecommitdiff
path: root/gcc/except.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2001-03-27 21:24:24 -0800
committerRichard Henderson <rth@gcc.gnu.org>2001-03-27 21:24:24 -0800
commit531073e70e23f5faa6a88240b5cd73e4df3202d6 (patch)
treebb2aa76dca055c2e46eabf6e73ba0e455926a762 /gcc/except.h
parent979988f32cd329b479079a32a12445f53125108d (diff)
downloadgcc-531073e70e23f5faa6a88240b5cd73e4df3202d6.zip
gcc-531073e70e23f5faa6a88240b5cd73e4df3202d6.tar.gz
gcc-531073e70e23f5faa6a88240b5cd73e4df3202d6.tar.bz2
Make -fsjlj-exceptions a configure option.
From-SVN: r40905
Diffstat (limited to 'gcc/except.h')
-rw-r--r--gcc/except.h28
1 files changed, 24 insertions, 4 deletions
diff --git a/gcc/except.h b/gcc/except.h
index f4eda90..9ce4706 100644
--- a/gcc/except.h
+++ b/gcc/except.h
@@ -472,10 +472,6 @@ extern void push_ehqueue PARAMS ((void));
/* Restore a previously pushed ehqueue. */
extern void pop_ehqueue PARAMS ((void));
-/* One to use setjmp/longjmp method of generating code. */
-
-extern int exceptions_via_longjmp;
-
/* One to enable asynchronous exception support. */
extern int flag_non_call_exceptions;
@@ -516,3 +512,27 @@ void init_insn_eh_region PARAMS ((rtx, int));
#ifdef rtx
#undef rtx
#endif
+
+/* Just because the user configured --with-sjlj-exceptions=no doesn't
+ mean that we can use call frame exceptions. Detect that the target
+ has appropriate support. */
+
+#ifdef CONFIG_SJLJ_EXCEPTIONS
+# if CONFIG_SJLJ_EXCEPTIONS == 1
+# define USING_SJLJ_EXCEPTIONS 1
+# endif
+# if CONFIG_SJLJ_EXCEPTIONS == 0
+# define USING_SJLJ_EXCEPTIONS 0
+# if !defined(DWARF2_UNWIND_INFO) && !defined(IA64_UNWIND_INFO)
+ #error "{DWARF2,IA64}_UNWIND_INFO required"
+# endif
+# endif
+#else
+# ifdef IA64_UNWIND_INFO
+# define USING_SJLJ_EXCEPTIONS (!IA64_UNWIND_INFO)
+# else
+# ifdef DWARF2_UNWIND_INFO
+# define USING_SJLJ_EXCEPTIONS (!DWARF2_UNWIND_INFO)
+# endif
+# endif
+#endif