>>                         Will it also be that smart if we do some
>>arithmetics, like `(EMACS_INT)i + 0L' or `(EMACS_INT)i*1L'?
>
>Will try that and see if it is useful to make the warning go away.

No, it changes nothing: the compiler is too clever, but not enough :-)

But, rereading it:

#define FIXNUM_OVERFLOW_P(i) \
    ((EMACS_INT)(i) > MOST_POSITIVE_FIXNUM \
     || (EMACS_INT)(i) < MOST_NEGATIVE_FIXNUM)

What is the purpose of casting (i) to EMACS_INT?  The cast is redundant,
unless (sizeof(i) > sizeof(EMACS_INT)).  Or unless (i) is floating point.
In both cases, the cast should not be there, I suppose.

In my case, removing the casts apparently changes nothing, and the
warnings are always there.


_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to