Hello, unfortunately that code still fails into libguile/print.c Infact, a signed char just arrives to 127 and the " < 128" causes:
../../guile-git/libguile/print.c:1101: warning: comparison is always true due to limited range of data type ../../guile-git/libguile/print.c:1108: warning: comparison is always true due to limited range of data type But in this manner it seems ok: #define SCM_MAKE_CHAR(x) \ (((scm_t_int32) (x) + 128) < 128 \ ? SCM_MAKE_ITAG8 ((scm_t_bits) (unsigned char) (x), scm_tc8_char) \ : SCM_MAKE_ITAG8 ((scm_t_bits) (x), scm_tc8_char)) Sincerely, Carlo Bramini. ---------- Initial Header ----------- >From : guile-devel-bounces+carlo.bramix=libero...@gnu.org To : "Ludovic Courtès" l...@gnu.org, guile-devel@gnu.org Cc : Date : Tue, 18 Aug 2009 10:32:29 -0700 (PDT) Subject : Re: `SCM_MAKE_CHAR ()' signedness issue > > From: Ludovic Courtès <l...@gnu.org> > > To: guile-devel@gnu.org > > Sent: Monday, August 17, 2009 8:33:03 AM > > Subject: Re: `SCM_MAKE_CHAR ()' signedness issue > > > > I'm fairly confident that for such a small piece of code inlining is > > always a good idea. > > OK. If the comparison is modified to become > > 35 #define SCM_MAKE_CHAR(x) \ > 36 (((x) < 128) \ > 37 ? SCM_MAKE_ITAG8 ((scm_t_bits) (unsigned char) (x), scm_tc8_char) \ > 38 : SCM_MAKE_ITAG8 ((scm_t_bits) (x), scm_tc8_char)) > > Then hopefully that will solve all the build problems. > > > Thanks, > > Ludo'. > > -Mike > > > >