From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Matthias Koeppe Newsgroups: gmane.lisp.guile.devel Subject: [Patch] libguile/gc-card.c: A cast does not yield an lvalue Date: Wed, 18 Jun 2003 08:56:05 +0200 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1055919574 13449 80.91.224.249 (18 Jun 2003 06:59:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 18 Jun 2003 06:59:34 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Jun 18 08:59:31 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19SWup-0003UW-00 for ; Wed, 18 Jun 2003 08:59:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19SWtq-0001aA-DM for guile-devel@m.gmane.org; Wed, 18 Jun 2003 02:58:30 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19SWtR-00013V-HV for guile-devel@gnu.org; Wed, 18 Jun 2003 02:58:05 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19SWt6-0008RG-KU for guile-devel@gnu.org; Wed, 18 Jun 2003 02:57:46 -0400 Original-Received: from merkur.math.uni-magdeburg.de ([141.44.75.40]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19SWrh-0006Gt-7Y for guile-devel@gnu.org; Wed, 18 Jun 2003 02:56:17 -0400 Original-Received: from kombi4 ([141.44.75.44] helo=kombi4.math.uni-magdeburg.de) by merkur.math.uni-magdeburg.de with esmtp (Exim 4.10) id 19SWrV-0002X9-00 for guile-devel@gnu.org; Wed, 18 Jun 2003 08:56:05 +0200 Original-Received: (from mkoeppe@localhost) by kombi4.math.uni-magdeburg.de (8.11.6+Sun/8.10.2) id h5I6u5Y05308; Wed, 18 Jun 2003 08:56:05 +0200 (MEST) X-Authentication-Warning: kombi4.math.uni-magdeburg.de: mkoeppe set sender to mkoeppe@mail.math.uni-magdeburg.de using -f Original-To: guile-devel@gnu.org Original-Lines: 43 X-Warning: no 'abuse'-account in domain mail.math.uni-magdeburg.de (cf. RFC2142/4.) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2549 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2549 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