Don't make assumptions about the relative place of i and val.
(EQ) [!NO_UNION_TYPE]: Don't forget to check the type match as well.
#ifdef EXPLICIT_SIGN_EXTEND
/* Make sure we sign-extend; compilers have been known to fail to do so. */
-#define XINT(a) (((a).i << (BITS_PER_EMACS_INT - VALBITS)) \
+#define XINT(a) (((a).s.val << (BITS_PER_EMACS_INT - VALBITS)) \
>> (BITS_PER_EMACS_INT - VALBITS))
#else
#define XINT(a) ((a).s.val)
extern Lisp_Object make_number ();
#endif
-#define EQ(x, y) ((x).s.val == (y).s.val)
+#define EQ(x, y) ((x).s.val == (y).s.val && (x).s.type == (y).s.type)
#endif /* NO_UNION_TYPE */