On Sun, 19 Mar 2000, thi wrote:

> during guile-oops compilation (w/ egcs-2.91.66), there are warnings:
> 
> "pointer of type `void *' used in arithmetic"
> 
> the following small patch to libguile/eval.h wraps SCM args to the C `-'
> operator w/ `SCM_UNPACK'.  this makes the warnings go away.


2000-03-20  Dirk Herrmann  <[EMAIL PROTECTED]>

        * eval.h:  Fix mixup of packed/unpacked SCM values.  (Thanks
        Thien-Thi Nguyen for the patch.)

However, I changed it slightly under the assumption that SCM_CAR, SCM_CDR
and SCM_CDRLOC will take SCM parameters rather than scm_bits_t parameters:

-#define SCM_GLOC_SYM(x) (SCM_CAR((x)-1L))
-#define SCM_GLOC_VAL(x) (SCM_CDR((x)-1L))
-#define SCM_GLOC_VAL_LOC(x) (SCM_CDRLOC((x)-1L))
+#define SCM_GLOC_SYM(x) (SCM_CAR (SCM_PACK (SCM_UNPACK (x) - 1L)))
+#define SCM_GLOC_VAL(x) (SCM_CDR (SCM_PACK (SCM_UNPACK (x) - 1L)))
+#define SCM_GLOC_VAL_LOC(x) (SCM_CDRLOC (SCM_PACK (SCM_UNPACK (x) - 1L)))

Thank you for the patch!

Best regards
Dirk Herrmann

Reply via email to