diff options
-rw-r--r-- | libguile/ChangeLog | 4 | ||||
-rw-r--r-- | libguile/numbers.c | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 2424d5fb2..525562c39 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,7 @@ +2002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + * numbers.c (scm_make_real): prevent reordering of statements + 2002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl> * eval.h: prepend libguile/ to include path diff --git a/libguile/numbers.c b/libguile/numbers.c index 53a40a0bd..ebdacdc8f 100644 --- a/libguile/numbers.c +++ b/libguile/numbers.c @@ -3015,6 +3015,13 @@ scm_make_real (double x) { SCM z; z = scm_double_cell (scm_tc16_real, 0, 0, 0); + + /* + scm_double_cell is inlined. strict C aliasing rules say that it's + OK to interchange the initialization above and the one below. We + don't want that, of course. + */ + scm_remember_1 (z); SCM_REAL_VALUE (z) = x; return z; } |