[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Preventing warnings in FIXNUM_OVERFLOW_P
From: |
Richard Stallman |
Subject: |
Re: Preventing warnings in FIXNUM_OVERFLOW_P |
Date: |
Fri, 19 Jan 2007 05:42:47 -0500 |
> #define FIXNUM_OVERFLOW_P(i) \
> ((unsigned long long)(i) > MOST_POSITIVE_FIXNUM \
> && (unsigned long long)(i) < MOST_NEGATIVE_FIXNUM)
>
> Would someone please give that approach a try and see if it works? I
> am having too much trouble with concentration right now to see whether
> that code is correct -- it might need somewhat more change than that
> in order to get the comparisons right in an unsigned type.
unsigned long long is neither guaranteed to exist on all supported
architectures, nor guaranteed to be longer than long.
`unsigned long long' does always exist, when you are using GCC. The
definition could be conditional on __GNUC__.
As for the whether `unsigned long long' may not be longer than `long',
why does that matter?
- Preventing warnings in FIXNUM_OVERFLOW_P, Richard Stallman, 2007/01/18
- Re: Preventing warnings in FIXNUM_OVERFLOW_P, David Kastrup, 2007/01/18
- Re: Preventing warnings in FIXNUM_OVERFLOW_P, Stefan Monnier, 2007/01/18
- Re: Preventing warnings in FIXNUM_OVERFLOW_P, Richard Stallman, 2007/01/19
- Re: Preventing warnings in FIXNUM_OVERFLOW_P, Eli Zaretskii, 2007/01/19
- Re: Preventing warnings in FIXNUM_OVERFLOW_P, Stefan Monnier, 2007/01/19
- Re: Preventing warnings in FIXNUM_OVERFLOW_P, Richard Stallman, 2007/01/19
- Re: Preventing warnings in FIXNUM_OVERFLOW_P, Eli Zaretskii, 2007/01/20
- Re: Preventing warnings in FIXNUM_OVERFLOW_P, Richard Stallman, 2007/01/21
Re: Preventing warnings in FIXNUM_OVERFLOW_P,
Richard Stallman <=
Re: Preventing warnings in FIXNUM_OVERFLOW_P, Eli Zaretskii, 2007/01/18