[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scm_short2num warning [was: guile on mac OSX]

From: Marius Vollmer
Subject: scm_short2num warning [was: guile on mac OSX]
Date: 31 Jul 2001 00:45:23 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.102

Rob Browning <address@hidden> writes:

> Marius Vollmer <address@hidden> writes:
> > > Here are some scary warnings i saw:
> > > 
> > > In file included from numbers.c:4220:
> > > ../libguile/num2integral.i.c: In function `scm_short2num':
> > > ../libguile/num2integral.i.c:90: warning: comparison is always true due 
> > > to limited range of data type
> > 
> > This is harmless.
> In my copy here, I have replace the offending test with a "1".  Does
> anyone familiar with the code know if this is an acceptable
> (temporary) fix?

I tried a couple of fixes, but none of them worked... The preprocessor
can not evaluate SCM_MOST_POSITIVE/NEGATIVE_FIXNUM, and the compiler
doesn't still emits a warning for X in "if (1 || X)" even so X is
optimized away.  And I'm a little bit baffled that the compiler
doesn't emit a warning for scm_ushort2num.

So, I'd say the best thing is to make
SCM_MOST_POSITIVE/NEGATIVE_FIXNUM computable by the preprocessor and
#ifdef the offending test away completely.  Anyone?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]