OSDN Git Service

2004-10-04 Jose Ruiz <ruiz@act-europe.fr>
[pf3gnuchains/gcc-fork.git] / gcc / unwind-sjlj.c
index a02fc32..08290fc 100644 (file)
@@ -185,7 +185,7 @@ _Unwind_Word
 _Unwind_GetCFA (struct _Unwind_Context *context __attribute__((unused)))
 {
   /* ??? Ideally __builtin_setjmp places the CFA in the jmpbuf.  */
-  return NULL;
+  return (_Unwind_Word) 0;
 }
 
 void
@@ -270,16 +270,13 @@ uw_init_context (struct _Unwind_Context *context)
   context->fc = _Unwind_SjLj_GetContext ();
 }
 
-/* ??? There appear to be bugs in integrate.c wrt __builtin_longjmp and
-   virtual-stack-vars.  An inline version of this segfaults on SPARC.  */
-#define uw_install_context(CURRENT, TARGET)            \
-  do                                                   \
-    {                                                  \
-      _Unwind_SjLj_SetContext ((TARGET)->fc);          \
-      longjmp ((TARGET)->fc->jbuf, 1);                 \
-    }                                                  \
-  while (0)
-
+static void __attribute__((noreturn))
+uw_install_context (struct _Unwind_Context *current __attribute__((unused)),
+                    struct _Unwind_Context *target)
+{
+  _Unwind_SjLj_SetContext (target->fc);
+  longjmp (target->fc->jbuf, 1);
+}
 
 static inline _Unwind_Ptr
 uw_identify_context (struct _Unwind_Context *context)