summaryrefslogtreecommitdiff
path: root/gcc/unwind-sjlj.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-21 20:26:44 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-21 20:26:44 +0000
commit0ff1830753ddd90564639afac3d3013187f0c8a6 (patch)
tree5e65f35e37a55bf10f429b4ed3add9916578e469 /gcc/unwind-sjlj.c
parent9c827df6a7b4d310574eb59662ac83c070cc12ed (diff)
downloadgcc-0ff1830753ddd90564639afac3d3013187f0c8a6.tar.gz
* rtl.h (LCT_RETURNS_TWICE): New.
* calls.c (emit_call_1): Set current_function_calls_setjmp for ECF_RETURNS_TWICE. (emit_library_call_value_1): Map LCT_RETURNS_TWICE to ECF_RETURNS_TWICE. * except.c (sjlj_emit_function_enter): Use LCT_RETURNS_TWICE for call to setjmp. * unwind-sjlj.c: Invent the setjmp.h declarations if inhibit_libc. * config/stormy16/stormy16.h (DONT_USE_BUILTIN_SETJMP): New. (JMP_BUF_SIZE): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45736 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/unwind-sjlj.c')
-rw-r--r--gcc/unwind-sjlj.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/unwind-sjlj.c b/gcc/unwind-sjlj.c
index 0f1d8ba7323..46f30ae1d8f 100644
--- a/gcc/unwind-sjlj.c
+++ b/gcc/unwind-sjlj.c
@@ -26,8 +26,13 @@
#if USING_SJLJ_EXCEPTIONS
#ifdef DONT_USE_BUILTIN_SETJMP
+#ifndef inhibit_libc
#include <setjmp.h>
#else
+typedef void *jmp_buf[JMP_BUF_SIZE];
+extern void longjmp(jmp_buf, int) __attribute__((noreturn));
+#endif
+#else
#define setjmp __builtin_setjmp
#define longjmp __builtin_longjmp
#endif