From 88cefbc7de86e0061b0cc4fb5417de78f7afba15 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 10 Oct 2008 10:00:21 +0200 Subject: Fix compilation error due to strict aliasing rules on `i386-unknown-freebsd7.0'. * libguile/threads.c (scm_threads_mark_stacks): Cast `&t->regs' to `(void *)' rather than `(SCM_STACKITEM *)' to avoid "warning: dereferencing type-punned pointer will break strict-aliasing rules" with GCC 4.2.1 on `i386-unknown-freebsd7.0'. --- libguile/threads.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libguile/threads.c') diff --git a/libguile/threads.c b/libguile/threads.c index 72af3d17f..3c1d0b5b6 100644 --- a/libguile/threads.c +++ b/libguile/threads.c @@ -1715,7 +1715,7 @@ scm_threads_mark_stacks (void) #else scm_mark_locations (t->top, t->base - t->top); #endif - scm_mark_locations ((SCM_STACKITEM *) &t->regs, + scm_mark_locations ((void *) &t->regs, ((size_t) sizeof(t->regs) / sizeof (SCM_STACKITEM))); } -- cgit v1.2.3