summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2008-10-10 10:00:21 +0200
committerLudovic Courtès <ludo@gnu.org>2008-10-10 10:00:57 +0200
commit88cefbc7de86e0061b0cc4fb5417de78f7afba15 (patch)
tree4546187e7005b331e71bc43e4634f249b57f1e17
parentec9ef386157036ed5388023121720a179d4faeb9 (diff)
downloadguile-88cefbc7de86e0061b0cc4fb5417de78f7afba15.tar.gz
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'.
-rw-r--r--NEWS1
-rw-r--r--libguile/threads.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 567fc1b86..02acd6e31 100644
--- a/NEWS
+++ b/NEWS
@@ -73,6 +73,7 @@ available: Guile is now always configured in "maintainer mode".
** Fix build issue on Tru64 and ia64-hp-hpux11.23 (`SCM_UNPACK' macro)
** Fix build issue on mips, mipsel, powerpc and ia64 (stack direction)
** Fix build issue on hppa2.0w-hp-hpux11.11 (`dirent64' and `readdir64_r')
+** Fix build issue on i386-unknown-freebsd7.0 ("break strict-aliasing rules")
** Fix misleading output from `(help rationalize)'
** Fix build failure on Debian hppa architecture (bad stack growth detection)
** Fix `gcd' when called with a single, negative argument.
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)));
}