Richard Stallman <[EMAIL PROTECTED]> writes:
> I think we should demand some way to turn off the warning in specific
> places. Does GCC have a feature to turn off warnings in a specific
> piece of code? I don't remember. It would be a good feature to have.
>
> However, a specific feature just for this kind of warning would also
> be useful. I have an idea for what it could look like: an extra cast.
>
> if ((int)(short)foo > (int)SHRT_MAX || (int)(short)foo < (int)SHRT_MIN)
>
> (short) would be a way of saying "yes I know this is a short", and
> this could suppress the warning.
>
> What do you think of that feature?
So you would define
#define FIXNUM_OVERFLOW_P(i) \
((EMACS_INT)(i) > MOST_POSITIVE_FIXNUM \
|| (EMACS_INT) (i) < MOST_NEGATIVE_FIXNUM)
as
#define FIXNUM_OVERFLOW_P(i) \
((EMACS_INT)(int)(i) > MOST_POSITIVE_FIXNUM \
|| (EMACS_INT)(int)(i) < MOST_NEGATIVE_FIXNUM)
Looks fine to me.
--
Kim F. Storm <[EMAIL PROTECTED]> http://www.cua.dk
_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug