unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Matthias Koeppe <mkoeppe@mail.math.uni-magdeburg.de>
Subject: [Patch] libguile/gc-card.c: A cast does not yield an lvalue
Date: Wed, 18 Jun 2003 08:56:05 +0200	[thread overview]
Message-ID: <uw5ptlbswl6.fsf@saturn.math.uni-magdeburg.de> (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


             reply	other threads:[~2003-06-18  6:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-18  6:56 Matthias Koeppe [this message]
2003-07-27 13:52 ` [Patch] libguile/gc-card.c: A cast does not yield an lvalue Marius Vollmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uw5ptlbswl6.fsf@saturn.math.uni-magdeburg.de \
    --to=mkoeppe@mail.math.uni-magdeburg.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).