summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@lilypond.org>2002-08-28 22:45:48 +0000
committerHan-Wen Nienhuys <hanwen@lilypond.org>2002-08-28 22:45:48 +0000
commit7200a36b83f0dc9faa846776ad4e6804b8c5da96 (patch)
tree39f6379baff4bee1a580b0ee6b768643a19f3820
parent44ecca617249293baee2a3ac6dd573befb912ab3 (diff)
downloadguile-7200a36b83f0dc9faa846776ad4e6804b8c5da96.tar.gz
(scm_make_real): prevent reordering of statements
-rw-r--r--libguile/ChangeLog4
-rw-r--r--libguile/numbers.c7
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;
}