[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?

reply via email to

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