unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* cvs compile error
@ 2004-05-25  9:18 Han-Wen Nienhuys
  2004-05-26 20:50 ` Dirk Herrmann
  0 siblings, 1 reply; 6+ messages in thread
From: Han-Wen Nienhuys @ 2004-05-25  9:18 UTC (permalink / raw)


X-Mailer: VM 7.14 under Emacs 21.3.1
Reply-To: hanwen@xs4all.nl
FCC: ~/persoonlijk/Mail/sent


CVS doesn't compile for me: 

gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -I../libguile-ltdl -g3 -ggdb -DSCM_DEBUG_CELL_ACCESSES=1 -O2 -Wall -Wmissing-prototypes -Werror -MT eval.lo -MD -MP -MF .deps/eval.Tpo -c eval.c  -fPIC -DPIC -o .libs/eval.o
eval.c: In function `scm_ilookup':
eval.c:2437: warning: use of compound expressions as lvalues is deprecated
eval.c:2438: warning: use of compound expressions as lvalues is deprecated
eval.c: In function `scm_lookupcar1':
eval.c:2537: warning: use of compound expressions as lvalues is deprecated
eval.c:2547: warning: use of compound expressions as lvalues is deprecated
eval.c:2552: warning: use of compound expressions as lvalues is deprecated
eval.c:2563: warning: use of compound expressions as lvalues is deprecated
eval.c:2611: warning: use of compound expressions as lvalues is deprecated
eval.c:2623: warning: use of compound expressions as lvalues is deprecated
eval.c: In function `scm_eval_args':
eval.c:2669: warning: use of compound expressions as lvalues is deprecated
eval.c: In function `ceval':
eval.c:3367: warning: use of compound expressions as lvalues is deprecated
eval.c:3373: warning: use of compound expressions as lvalues is deprecated
eval.c: In function `scm_nconc2last':
eval.c:4457: warning: use of compound expressions as lvalues is deprecated
eval.c: In function `scm_map':
eval.c:5222: warning: use of compound expressions as lvalues is deprecated
eval.c:5241: warning: use of compound expressions as lvalues is deprecated
eval.c:5262: warning: use of compound expressions as lvalues is deprecated
In file included from eval.c:5738:
eval.c: In function `deval_args':
eval.c:2877: warning: use of compound expressions as lvalues is deprecated
eval.c: In function `deval':
eval.c:3367: warning: use of compound expressions as lvalues is deprecated
eval.c:3373: warning: use of compound expressions as lvalues is deprecated
eval.c:4155: warning: use of compound expressions as lvalues is deprecated
make[2]: *** [eval.lo] Fout 1
make[2]: Leaving directory `/home/hanwen/usr/src/savannah/official-guile/guile/guile-core/libguile'
make[1]: *** [all-recursive] Fout 1
make[1]: Leaving directory `/home/hanwen/usr/src/savannah/official-guile/guile/guile-core'
make: *** [all] Fout 2


-- 

 Han-Wen Nienhuys   |   hanwen@xs4all.nl   |   http://www.xs4all.nl/~hanwen 



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: cvs compile error
  2004-05-25  9:18 cvs compile error Han-Wen Nienhuys
@ 2004-05-26 20:50 ` Dirk Herrmann
  2004-05-26 21:05   ` Han-Wen Nienhuys
  2004-05-26 21:19   ` Han-Wen Nienhuys
  0 siblings, 2 replies; 6+ messages in thread
From: Dirk Herrmann @ 2004-05-26 20:50 UTC (permalink / raw)
  Cc: guile-devel

Han-Wen Nienhuys wrote:

>  CVS doesn't compile for me:
>
>  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -I../libguile-ltdl -g3
>  -ggdb -DSCM_DEBUG_CELL_ACCESSES=1 -O2 -Wall -Wmissing-prototypes
>  -Werror -MT eval.lo -MD -MP -MF .deps/eval.Tpo -c eval.c -fPIC -DPIC
>  -o .libs/eval.o

Hmm, works for me, with exactly those options. I am using:
  gcc (GCC) 3.3.1 (SuSE Linux)

What version of gcc are you using?

Best regards,
Dirk



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: cvs compile error
  2004-05-26 20:50 ` Dirk Herrmann
@ 2004-05-26 21:05   ` Han-Wen Nienhuys
  2004-05-29  7:16     ` Dirk Herrmann
  2004-05-26 21:19   ` Han-Wen Nienhuys
  1 sibling, 1 reply; 6+ messages in thread
From: Han-Wen Nienhuys @ 2004-05-26 21:05 UTC (permalink / raw)
  Cc: guile-devel

dirk@dirk-herrmanns-seiten.de writes:
> Han-Wen Nienhuys wrote:
> 
> >  CVS doesn't compile for me:
> >
> >  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -I../libguile-ltdl -g3
> >  -ggdb -DSCM_DEBUG_CELL_ACCESSES=1 -O2 -Wall -Wmissing-prototypes
> >  -Werror -MT eval.lo -MD -MP -MF .deps/eval.Tpo -c eval.c -fPIC -DPIC
> >  -o .libs/eval.o
> 
> Hmm, works for me, with exactly those options. I am using:
>   gcc (GCC) 3.3.1 (SuSE Linux)
> 
> What version of gcc are you using?

Fedora core 2, gcc 3.3.3.

(I'm trying 3.4 just now to see what happens.)


--
 Han-Wen Nienhuys   |   hanwen@xs4all.nl   |   http://www.xs4all.nl/~hanwen 



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: cvs compile error
  2004-05-26 20:50 ` Dirk Herrmann
  2004-05-26 21:05   ` Han-Wen Nienhuys
@ 2004-05-26 21:19   ` Han-Wen Nienhuys
  1 sibling, 0 replies; 6+ messages in thread
From: Han-Wen Nienhuys @ 2004-05-26 21:19 UTC (permalink / raw)
  Cc: guile-devel

dirk@dirk-herrmanns-seiten.de writes:
> Han-Wen Nienhuys wrote:
> 
> >  CVS doesn't compile for me:
> >
> >  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -I../libguile-ltdl -g3
> >  -ggdb -DSCM_DEBUG_CELL_ACCESSES=1 -O2 -Wall -Wmissing-prototypes
> >  -Werror -MT eval.lo -MD -MP -MF .deps/eval.Tpo -c eval.c -fPIC -DPIC
> >  -o .libs/eval.o
> 
> Hmm, works for me, with exactly those options. I am using:
>   gcc (GCC) 3.3.1 (SuSE Linux)
> 
> What version of gcc are you using?

Ah, I'm running with  -DSCM_DEBUG_CELL_ACCESSES=1.

The culprit is

 &SCM_VALIDATE_CELL ((x), SCM_GC_CELL_OBJECT ((x), (n)))

I fixed this in CVS.


--
 Han-Wen Nienhuys   |   hanwen@xs4all.nl   |   http://www.xs4all.nl/~hanwen 



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: cvs compile error
  2004-05-26 21:05   ` Han-Wen Nienhuys
@ 2004-05-29  7:16     ` Dirk Herrmann
  2004-05-29  7:28       ` Dirk Herrmann
  0 siblings, 1 reply; 6+ messages in thread
From: Dirk Herrmann @ 2004-05-29  7:16 UTC (permalink / raw)
  Cc: guile-devel

Han-Wen Nienhuys wrote:

>  dirk@dirk-herrmanns-seiten.de writes:
>
> > Han-Wen Nienhuys wrote:
> >
> >> CVS doesn't compile for me:
> >>
> >> gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -I../libguile-ltdl -g3
> >> -ggdb -DSCM_DEBUG_CELL_ACCESSES=1 -O2 -Wall -Wmissing-prototypes
> >> -Werror -MT eval.lo -MD -MP -MF .deps/eval.Tpo -c eval.c -fPIC
> >> -DPIC -o .libs/eval.o
> >
> > Hmm, works for me, with exactly those options. I am using: gcc
> > (GCC) 3.3.1 (SuSE Linux)
> >
> > What version of gcc are you using?
>
>  Fedora core 2, gcc 3.3.3.
>
>  (I'm trying 3.4 just now to see what happens.)

Where the results on 3.4 different in any way?

Could you please check if the problem could also be solved by the patch 
below?
On my system, again, I don't get any warnings. It would also be nice if 
you could
check whether the patch below brings any performance differences.

Best regards,
Dirk


Index: libguile/deprecated.h
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/deprecated.h,v
retrieving revision 1.19
diff -u -b -r1.19 deprecated.h
--- libguile/deprecated.h    6 May 2004 16:42:50 -0000    1.19
+++ libguile/deprecated.h    29 May 2004 06:37:25 -0000
@@ -300,11 +300,6 @@
 
 #define SCM_VALIDATE_OPDIR(pos, port) SCM_MAKE_VALIDATE (pos, port, OPDIRP)
 
-/* Deprecated because we can not safely cast a SCM* to a scm_t_bits*
- */
-
-#define SCM_CELL_WORD_LOC(x, n)   
((scm_t_bits*)SCM_CELL_OBJECT_LOC((x),(n)))
-
 void scm_i_init_deprecated (void);
 
 #endif
Index: libguile/gc.h
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/gc.h,v
retrieving revision 1.117
diff -u -b -r1.117 gc.h
--- libguile/gc.h    26 May 2004 21:15:30 -0000    1.117
+++ libguile/gc.h    29 May 2004 06:37:25 -0000
@@ -36,8 +36,10 @@
 
 typedef struct scm_t_cell
 {
-  SCM word_0;
-  SCM word_1;
+  union {
+    scm_t_bits word;
+    SCM object;
+  } elements[2];
 } scm_t_cell;
 
 /*
@@ -73,12 +75,14 @@
 #define SCM_GC_CARD_N_CELLS        256
 #define SCM_GC_SIZEOF_CARD         SCM_GC_CARD_N_CELLS * sizeof 
(scm_t_cell)
 
-#define SCM_GC_CARD_BVEC(card)  ((scm_t_c_bvec_long *) ((card)->word_0))
+#define SCM_GC_CARD_BVEC(card) \
+  ((scm_t_c_bvec_long *) ((card)->elements[0].word))
 #define SCM_GC_SET_CARD_BVEC(card, bvec) \
-    ((card)->word_0 = (SCM) (bvec))
-#define SCM_GC_GET_CARD_FLAGS(card) ((long) ((card)->word_1))
+  ((card)->elements[0].word = (scm_t_bits) (bvec))
+#define SCM_GC_GET_CARD_FLAGS(card) \
+  ((long) ((card)->elements[1].word))
 #define SCM_GC_SET_CARD_FLAGS(card, flags) \
-    ((card)->word_1 = (SCM) (flags))
+  ((card)->elements[1].word = (flags))
 
 #define SCM_GC_GET_CARD_FLAG(card, shift) \
  (SCM_GC_GET_CARD_FLAGS (card) & (1L << (shift)))
@@ -141,12 +145,13 @@
  * in debug mode.  In particular these macros will even work for free 
cells,
  * which should never be encountered by user code.  */
 
-#define SCM_GC_CELL_OBJECT(x, n) (((SCM *)SCM2PTR (x)) [n])
-#define SCM_GC_CELL_WORD(x, n)   (SCM_UNPACK (SCM_GC_CELL_OBJECT ((x), 
(n))))
+#define SCM_GC_CELL_WORD(x, n) (((SCM2PTR (x))->elements[n]).word)
+#define SCM_GC_CELL_OBJECT(x, n) (((SCM2PTR (x))->elements[n]).object)
 
-#define SCM_GC_SET_CELL_OBJECT(x, n, v) ((((SCM *)SCM2PTR (x)) [n]) = (v))
+#define SCM_GC_SET_CELL_OBJECT(x, n, v) \
+  (((SCM2PTR (x))->elements[n]).object = (v))
 #define SCM_GC_SET_CELL_WORD(x, n, v)  \
-  (SCM_GC_SET_CELL_OBJECT ((x), (n), SCM_PACK (v)))
+  (((SCM2PTR (x))->elements[n]).word = (v))
 
 #define SCM_GC_CELL_TYPE(x) (SCM_GC_CELL_OBJECT ((x), 0))
 
@@ -214,7 +219,8 @@
   (SCM_GC_SET_CELL_OBJECT ((x), 1, (v)))
 
 
-#define SCM_CELL_OBJECT_LOC(x, n) (SCM_VALIDATE_CELL((x), 
&SCM_GC_CELL_OBJECT ((x), (n))))
+#define SCM_CELL_WORD_LOC(x, n)   (&SCM_CELL_WORD ((x), (n)))
+#define SCM_CELL_OBJECT_LOC(x, n) (&SCM_CELL_OBJECT ((x), (n)))
 #define SCM_CARLOC(x)             (SCM_CELL_OBJECT_LOC ((x), 0))
 #define SCM_CDRLOC(x)             (SCM_CELL_OBJECT_LOC ((x), 1))
 
Index: libguile/numbers.h
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/numbers.h,v
retrieving revision 1.82
diff -u -b -r1.82 numbers.h
--- libguile/numbers.h    15 May 2004 15:50:24 -0000    1.82
+++ libguile/numbers.h    29 May 2004 06:37:25 -0000
@@ -144,7 +144,7 @@
 #define SCM_COMPLEX_IMAG(x) (SCM_COMPLEX_MEM (x)->imag)
 
 /* Each bignum is just an mpz_t stored in a double cell starting at 
word 1. */
-#define SCM_I_BIG_MPZ(x) (*((mpz_t *) (SCM_CELL_OBJECT_LOC((x),1))))
+#define SCM_I_BIG_MPZ(x) (*((mpz_t *) (SCM_CELL_WORD_LOC ((x), 1))))
 #define SCM_BIGP(x) (!SCM_IMP (x) && SCM_TYP16 (x) == scm_tc16_big)
 
 #define SCM_NUMBERP(x) (SCM_INUMP(x) || SCM_NUMP(x))




_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: cvs compile error
  2004-05-29  7:16     ` Dirk Herrmann
@ 2004-05-29  7:28       ` Dirk Herrmann
  0 siblings, 0 replies; 6+ messages in thread
From: Dirk Herrmann @ 2004-05-29  7:28 UTC (permalink / raw)
  Cc: guile-devel

Dirk Herrmann wrote:

> Where the results on 3.4 different in any way?
>
> Could you please check if the problem could also be solved by the 
> patch below?
> On my system, again, I don't get any warnings. It would also be nice 
> if you could
> check whether the patch below brings any performance differences. 

Oops, please forget about my question above: Certainly my patch does not 
solve the problem that you had reported.

Best regards,
Dirk




_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-05-29  7:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-25  9:18 cvs compile error Han-Wen Nienhuys
2004-05-26 20:50 ` Dirk Herrmann
2004-05-26 21:05   ` Han-Wen Nienhuys
2004-05-29  7:16     ` Dirk Herrmann
2004-05-29  7:28       ` Dirk Herrmann
2004-05-26 21:19   ` Han-Wen Nienhuys

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).