[Top][All Lists]

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

Re: macro FIXNUM_OVERFLOW_P in lisp.h is valid ?

From: Eli Zaretskii
Subject: Re: macro FIXNUM_OVERFLOW_P in lisp.h is valid ?
Date: Sat, 24 Oct 2009 00:02:57 +0200

> From: Andreas Schwab <address@hidden>
> Date: Fri, 23 Oct 2009 22:57:07 +0200
> Cc: address@hidden
> >     #define FIXNUM_OVERFLOW_P(i) \
> >        || (EMACS_INT) (i) < MOST_NEGATIVE_FIXNUM)
> >
> > I think FIXNUM_OVERFLOW_P is problematic.
> Thanks for the report.  The right fix is to remove the cast, so that the
> compiler will promote the operands to the appropriate common type.

I think removing the cast will cause the compiler to whine on 64-bit
platforms about comparison being always right or wrong when the
argument is narrower than a 64-bit long.  IIRC, that's why the cast
was introduced in the first place.

reply via email to

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