summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/gc.h7
-rw-r--r--mach_dep.c2
-rw-r--r--misc.c8
-rw-r--r--pthread_support.c4
-rw-r--r--win32_threads.c2
5 files changed, 14 insertions, 9 deletions
diff --git a/include/gc.h b/include/gc.h
index b952285b..753b5c9a 100644
--- a/include/gc.h
+++ b/include/gc.h
@@ -1328,7 +1328,12 @@ GC_API int GC_CALL GC_invoke_finalizers(void);
__asm__ __volatile__(" " : : "X"(ptr) : "memory")
#else
GC_API void GC_CALL GC_noop1(GC_word);
-# define GC_reachable_here(ptr) GC_noop1((GC_word)(ptr))
+# ifdef LINT2
+# define GC_reachable_here(ptr) GC_noop1(~(GC_word)(ptr)^(~(GC_word)0))
+ /* The expression matches the one of COVERT_DATAFLOW(). */
+# else
+# define GC_reachable_here(ptr) GC_noop1((GC_word)(ptr))
+# endif
#endif
/* GC_set_warn_proc can be used to redirect or filter warning messages. */
diff --git a/mach_dep.c b/mach_dep.c
index 94605a30..4cd7d399 100644
--- a/mach_dep.c
+++ b/mach_dep.c
@@ -334,7 +334,7 @@ GC_INNER void GC_with_callee_saves_pushed(void (*fn)(ptr_t, void *),
/* Strongly discourage the compiler from treating the above */
/* as a tail-call, since that would pop the register */
/* contents before we get a chance to look at them. */
- GC_noop1((word)(&dummy));
+ GC_noop1(COVERT_DATAFLOW(&dummy));
}
#endif /* !SN_TARGET_ORBIS && !SN_TARGET_PSP2 */
diff --git a/misc.c b/misc.c
index 2f001d01..bcf4c72d 100644
--- a/misc.c
+++ b/misc.c
@@ -314,7 +314,7 @@ STATIC void GC_init_size_map(void)
}
/* Make sure the recursive call is not a tail call, and the bzero */
/* call is not recognized as dead code. */
- GC_noop1((word)dummy);
+ GC_noop1(COVERT_DATAFLOW(dummy));
return(arg);
}
# endif /* !ASM_CLEAR_CODE */
@@ -2130,7 +2130,7 @@ GC_API void * GC_CALL GC_call_with_stack_base(GC_stack_base_func fn, void *arg)
result = fn(&base, arg);
/* Strongly discourage the compiler from treating the above */
/* as a tail call. */
- GC_noop1((word)(&base));
+ GC_noop1(COVERT_DATAFLOW(&base));
return result;
}
@@ -2155,13 +2155,13 @@ GC_API void * GC_CALL GC_call_with_gc_active(GC_fn_type fn,
/* GC_get_main_stack_base() is unimplemented or broken for */
/* the platform). */
if ((word)GC_stackbottom HOTTER_THAN (word)(&stacksect))
- GC_stackbottom = (ptr_t)(&stacksect);
+ GC_stackbottom = (ptr_t)COVERT_DATAFLOW(&stacksect);
if (GC_blocked_sp == NULL) {
/* We are not inside GC_do_blocking() - do nothing more. */
client_data = fn(client_data);
/* Prevent treating the above as a tail call. */
- GC_noop1((word)(&stacksect));
+ GC_noop1(COVERT_DATAFLOW(&stacksect));
return client_data; /* result */
}
diff --git a/pthread_support.c b/pthread_support.c
index 8738732d..4105077f 100644
--- a/pthread_support.c
+++ b/pthread_support.c
@@ -1424,7 +1424,7 @@ GC_API void * GC_CALL GC_call_with_gc_active(GC_fn_type fn,
} else {
/* The original stack. */
if ((word)GC_stackbottom HOTTER_THAN (word)(&stacksect))
- GC_stackbottom = (ptr_t)(&stacksect);
+ GC_stackbottom = (ptr_t)COVERT_DATAFLOW(&stacksect);
}
if (!me->thread_blocked) {
@@ -1432,7 +1432,7 @@ GC_API void * GC_CALL GC_call_with_gc_active(GC_fn_type fn,
UNLOCK();
client_data = fn(client_data);
/* Prevent treating the above as a tail call. */
- GC_noop1((word)(&stacksect));
+ GC_noop1(COVERT_DATAFLOW(&stacksect));
return client_data; /* result */
}
diff --git a/win32_threads.c b/win32_threads.c
index d5a59809..e2fc9e15 100644
--- a/win32_threads.c
+++ b/win32_threads.c
@@ -923,7 +923,7 @@ GC_API void * GC_CALL GC_call_with_gc_active(GC_fn_type fn,
UNLOCK();
client_data = fn(client_data);
/* Prevent treating the above as a tail call. */
- GC_noop1((word)(&stacksect));
+ GC_noop1(COVERT_DATAFLOW(&stacksect));
return client_data; /* result */
}