diff src/lisp.h @ 68628:6c6e4e3cccc8

(XPNTR) [!NO_UNION_TYPE && !HAVE_SHM && !DATA_SEG_BITS]: Cast bitfield value to EMACS_INT, to suppress gcc warning.
author Ken Raeburn <raeburn@raeburn.org>
date Sun, 05 Feb 2006 12:21:09 +0000
parents b23a7ce63153
children 3bd95f4f2941 d04d8ccb3c41
line wrap: on
line diff
--- a/src/lisp.h	Sun Feb 05 12:15:02 2006 +0000
+++ b/src/lisp.h	Sun Feb 05 12:21:09 2006 +0000
@@ -484,7 +484,11 @@
    in a Lisp object whose data type says it points to something.  */
 #define XPNTR(a) (XUINT (a) | DATA_SEG_BITS)
 #else
-#define XPNTR(a) XUINT (a)
+/* Some versions of gcc seem to consider the bitfield width when
+   issuing the "cast to pointer from integer of different size"
+   warning, so the cast is here to widen the value back to its natural
+   size.  */
+#define XPNTR(a) ((EMACS_INT) XUINT (a))
 #endif
 #endif /* not HAVE_SHM */
 #endif /* no XPNTR */