0.9.3.65:
authorGabor Melis <mega@hotpop.com>
Fri, 19 Aug 2005 14:25:29 +0000 (14:25 +0000)
committerGabor Melis <mega@hotpop.com>
Fri, 19 Aug 2005 14:25:29 +0000 (14:25 +0000)
  * compile runtime without warnings on gcc4 (except for one recently
    acquired warning related to MAGIC_HASH_VECTOR_VALUE in gencgc.c)

src/runtime/coreparse.c
src/runtime/interr.c
src/runtime/interr.h
src/runtime/interrupt.c
src/runtime/monitor.h
src/runtime/runtime.h
src/runtime/save.c
src/runtime/x86-64-arch.h
src/runtime/x86-arch.h
version.lisp-expr

index dd74c74..57639ec 100644 (file)
@@ -182,7 +182,7 @@ load_core_file(char *file)
 
                 FSHOW((stderr, "build_id[]=\"%s\"\n", build_id));
                 FSHOW((stderr, "remaining_len = %d\n", remaining_len));
-                if (remaining_len != strlen(build_id))
+                if (remaining_len != strlen((const char *)build_id))
                     goto losing_build_id;
                 for (i = 0; i < remaining_len; ++i) {
                     FSHOW((stderr, "ptr[%d] = char = %d, expected=%d\n",
index 64eacea..9238601 100644 (file)
@@ -43,7 +43,7 @@ set_lossage_handler(void handler(void))
     lossage_handler = handler;
 }
 
-never_returns
+void
 lose(char *fmt, ...)
 {
     va_list ap;
index 5e10394..3ebe8a1 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef _INTERR_H_
 #define _INTERR_H_
 
-extern never_returns lose(char *fmt, ...);
+extern void lose(char *fmt, ...) never_returns;
 extern void set_lossage_handler(void fun(void));
 extern void describe_internal_error(os_context_t *context);
 
index d711858..e82a8cd 100644 (file)
@@ -897,14 +897,18 @@ void interrupt_thread_handler(int num, siginfo_t *info, void *v_context)
      * thread interrupt execution is undefined. */
     struct thread *th=arch_os_get_current_thread();
     struct cons *c;
+    lispobj function;
     if (th->state != STATE_RUNNING)
-        lose("interrupt_thread_handler: thread %ld in wrong state: %d\n",
+        lose("interrupt_thread_handler: thread %lu in wrong state: %d\n",
              th->os_thread,fixnum_value(th->state));
     get_spinlock(&th->interrupt_fun_lock,(long)th);
     c=((struct cons *)native_pointer(th->interrupt_fun));
-    arrange_return_to_lisp_function(context,c->car);
+    function=c->car;
     th->interrupt_fun=c->cdr;
     release_spinlock(&th->interrupt_fun_lock);
+    if (function==NIL)
+        lose("interrupt_thread_handler: NIL function\n");
+    arrange_return_to_lisp_function(context,function);
 }
 
 #endif
index f899466..9a75652 100644 (file)
@@ -9,5 +9,5 @@
  * files for more information.
  */
 
-extern void throw_to_monitor(void);
-extern void monitor_or_something(void);
+extern void throw_to_monitor(void) never_returns;
+extern void monitor_or_something(void) never_returns;
index 48f0710..425db45 100644 (file)
@@ -148,11 +148,15 @@ typedef int boolean;
 
 /* KLUDGE: As far as I can tell there's no ANSI C way of saying
  * "this function never returns". This is the way that you do it
- * in GCC later than version 2.7 or so. If you are using some
- * compiler that doesn't understand this, you could could just
- * change it to "typedef void never_returns" and nothing would
- * break, though you might get a few more bytes of compiled code or
- * a few more compiler warnings. -- WHN 2000-10-21 */
-typedef volatile void never_returns;
+ * in GCC later than version 2.5 or so. */
+#if defined(__GNUC__)
+#if __GNUC_PREREQ(2,5)
+#define never_returns __attribute__ ((noreturn))
+#else
+#define never_returns
+#endif
+#else
+#define never_returns
+#endif
 
 #endif /* _SBCL_RUNTIME_H_ */
index 450d3a4..4ace124 100644 (file)
@@ -131,10 +131,10 @@ save(char *filename, lispobj init_function)
     write_lispobj(/* (We're writing the word count of the entry here, and the 2
           * term is one word for the leading BUILD_ID_CORE_ENTRY_TYPE_CODE
           * word and one word where we store the count itself.) */
-         2 + strlen(build_id),
+         2 + strlen((const char *)build_id),
          file);
     {
-        char *p;
+        unsigned char *p;
         for (p = build_id; *p; ++p)
             write_lispobj(*p, file);
     }
index 4cb9d4c..90b5150 100644 (file)
@@ -16,7 +16,7 @@
  * here? (The answer wasn't obvious to me when merging the
  * architecture-abstracting patches for CSR's SPARC port. -- WHN 2002-02-15) */
 
-extern never_returns lose(char *fmt, ...);
+#include "interr.h"
 
 static inline void
 get_spinlock(volatile lispobj *word,long value)
index 6c7802a..b4ce701 100644 (file)
@@ -16,7 +16,7 @@
  * here? (The answer wasn't obvious to me when merging the
  * architecture-abstracting patches for CSR's SPARC port. -- WHN 2002-02-15) */
 
-extern never_returns lose(char *fmt, ...);
+#include "interr.h"
 
 static inline void
 get_spinlock(volatile lispobj *word,long value)
index 0281078..1f4da9a 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.3.64"
+"0.9.3.65"