[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_POSITIVE_FIXNUM \
> > || (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.
- Re: macro FIXNUM_OVERFLOW_P in lisp.h is valid ?, (continued)
- Re: macro FIXNUM_OVERFLOW_P in lisp.h is valid ?, Andreas Schwab, 2009/10/24
- Re: macro FIXNUM_OVERFLOW_P in lisp.h is valid ?, Stefan Monnier, 2009/10/24
- Re: macro FIXNUM_OVERFLOW_P in lisp.h is valid ?, Toru TSUNEYOSHI, 2009/10/26
- Message not available
- Re: macro FIXNUM_OVERFLOW_P in lisp.h is valid ?, Toru TSUNEYOSHI, 2009/10/24
- Message not available
- Message not available
- Re: macro FIXNUM_OVERFLOW_P in lisp.h is valid ?, Toru TSUNEYOSHI, 2009/10/24
- Re: macro FIXNUM_OVERFLOW_P in lisp.h is valid ?, Eli Zaretskii, 2009/10/24
Re: macro FIXNUM_OVERFLOW_P in lisp.h is valid ?, Andreas Schwab, 2009/10/23
Re: macro FIXNUM_OVERFLOW_P in lisp.h is valid ?, Stefan Monnier, 2009/10/23