This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
showstopper bug : guile and C++
- To: guile at sourceware dot cygnus dot com
- Subject: showstopper bug : guile and C++
- From: Han-Wen Nienhuys <hanwen at cs dot uu dot nl>
- Date: Fri, 9 Jun 2000 19:21:10 +0200 (CEST)
- Reply-To: hanwen at cs dot uu dot nl
apparently, g++ doesn't like the way SCM_VALIDATE is called.
#include <libguile.h>
int foo()
{
SCM foo;
int t = SCM_CELL_WORD_0(foo);
return t;
}
cd /users/hanwen/usr/src/lilypond/
g++ -Wall -I/tmp/include foo.cc
foo.cc: In function `int foo()':
foo.cc:6: converting to `void' from `int'
foo.cc:6: converting to `void' from `int'
Compilation exited abnormally with code 1 at Fri Jun 9 19:18:01
suggestion: use the following in gc.h
#if SCM_DEBUG_CELL_ACCESSES == 1
#define DO_VALIDATE (SCM_VALIDATE_CELL (x)),
#else
#define DO_VALIDATE
#endif
#define SCM_CELL_WORD(x, n) \
( DO_VALIDATE\
(((scm_bits_t *) SCM2PTR (x)) [n]) )
--
Han-Wen Nienhuys, hanwen@cs.uu.nl ** GNU LilyPond - The Music Typesetter
http://www.cs.uu.nl/people/hanwen/lilypond/index.html