This patch to libbacktrace fixes the type returned by the backup
definition of backtrace_atomic_load_pointer for the case where
libbacktrace is compiled with neither the atomic nor the sync
functions available.  This case does not arise in general but could
arise from other uses of the library, or when building stage 1 with a
very old host compiler.  Bootstrapped and ran libbacktrace tests on
x86_64-unknown-linux-gnu, which proves nothing, really.

Ian


2014-10-23  Ian Lance Taylor  <i...@google.com>

* internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
Fix to return void *.
Index: internal.h
===================================================================
--- internal.h  (revision 216522)
+++ internal.h  (working copy)
@@ -99,7 +99,7 @@ extern void backtrace_atomic_store_int (
 /* We have neither the sync nor the atomic functions.  These will
    never be called.  */
 
-#define backtrace_atomic_load_pointer(p) (abort(), 0)
+#define backtrace_atomic_load_pointer(p) (abort(), (void *) NULL)
 #define backtrace_atomic_load_int(p) (abort(), 0)
 #define backtrace_atomic_store_pointer(p, v) abort()
 #define backtrace_atomic_store_size_t(p, v) abort()

Reply via email to