1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 12:20:26 +02:00

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'.
This commit is contained in:
Ludovic Courtès 2008-10-10 10:00:21 +02:00
parent f23f643881
commit c18ed8cead
2 changed files with 2 additions and 1 deletions

View file

@ -1391,7 +1391,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)));
}