changeset 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 471c1258574d
children 7d4f2e278195
files src/lisp.h
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
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 */