[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Patch] libguile/gc-card.c: A cast does not yield an lvalue
From: |
Matthias Koeppe |
Subject: |
[Patch] libguile/gc-card.c: A cast does not yield an lvalue |
Date: |
Wed, 18 Jun 2003 08:56:05 +0200 |
When compiling Guile from CVS HEAD with the Sun Forte C compiler, I
get the error "A cast does not yield an lvalue" when compiling
gc-card.c.
Here is a patch. (See also the ChangeLog entry of 2001-01-11.)
Index: libguile/gc.h
===================================================================
RCS file: /cvs/guile/guile-core/libguile/gc.h,v
retrieving revision 1.109
diff -u -r1.109 gc.h
--- libguile/gc.h 29 May 2003 14:39:13 -0000 1.109
+++ libguile/gc.h 18 Jun 2003 06:49:08 -0000
@@ -103,6 +103,7 @@
#define SCM_GC_CELL_CARD(x) ((scm_t_cell *) ((long) (x) &
SCM_GC_CARD_ADDR_MASK))
#define SCM_GC_CELL_OFFSET(x) (((long) (x) & SCM_GC_CARD_SIZE_MASK) >>
SCM_CELL_SIZE_SHIFT)
#define SCM_GC_CELL_BVEC(x) SCM_GC_CARD_BVEC (SCM_GC_CELL_CARD (x))
+#define SCM_GC_SET_CELL_BVEC(x, bvec) SCM_GC_SET_CARD_BVEC
(SCM_GC_CELL_CARD (x), bvec)
#define SCM_GC_CELL_GET_BIT(x) SCM_C_BVEC_GET (SCM_GC_CELL_BVEC (x),
SCM_GC_CELL_OFFSET (x))
#define SCM_GC_CELL_SET_BIT(x) SCM_C_BVEC_SET (SCM_GC_CELL_BVEC (x),
SCM_GC_CELL_OFFSET (x))
#define SCM_GC_CELL_CLEAR_BIT(x) SCM_C_BVEC_CLEAR (SCM_GC_CELL_BVEC (x),
SCM_GC_CELL_OFFSET (x))
Index: libguile/gc-card.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/gc-card.c,v
retrieving revision 1.17
diff -u -r1.17 gc-card.c
--- libguile/gc-card.c 4 Jun 2003 05:28:34 -0000 1.17
+++ libguile/gc-card.c 18 Jun 2003 06:49:08 -0000
@@ -308,7 +308,7 @@
int idx = (card - seg->bounds[0]) / SCM_GC_CARD_N_CELLS;
bvec_ptr += idx *SCM_GC_CARD_BVEC_SIZE_IN_LONGS;
- SCM_GC_CELL_BVEC (card) = bvec_ptr;
+ SCM_GC_SET_CELL_BVEC (card, bvec_ptr);
/*
ASSUMPTION: n_header_cells <= 2.
--
Matthias Koeppe -- http://www.math.uni-magdeburg.de/~mkoeppe
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Patch] libguile/gc-card.c: A cast does not yield an lvalue,
Matthias Koeppe <=