* [Patch] libguile/gc-card.c: A cast does not yield an lvalue
@ 2003-06-18 6:56 Matthias Koeppe
2003-07-27 13:52 ` Marius Vollmer
0 siblings, 1 reply; 2+ messages in thread
From: Matthias Koeppe @ 2003-06-18 6:56 UTC (permalink / raw)
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
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-07-27 13:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-18 6:56 [Patch] libguile/gc-card.c: A cast does not yield an lvalue Matthias Koeppe
2003-07-27 13:52 ` Marius Vollmer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).