This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Preventing warnings


I think this warning is starting to happen for valid code because of
64-bit machines.

    You can avoid it by using unsigned types.  I think that something like
    this will do the trick:

    #define FIXNUM_OVERFLOW_P(i)					\
      ((unsigned long long)(i) > MOST_POSITIVE_FIXNUM		\
       && (unsigned long long)(i) < MOST_NEGATIVE_FIXNUM)

Thanks.  I will ask people to give that a try.

Is this documented as a way to avoid problems with that warning?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]