]> git.eshelyaron.com Git - emacs.git/commitdiff
(XPNTR) [!NO_UNION_TYPE && !HAVE_SHM && !DATA_SEG_BITS]: Cast bitfield
authorKen Raeburn <raeburn@raeburn.org>
Sun, 5 Feb 2006 12:21:40 +0000 (12:21 +0000)
committerKen Raeburn <raeburn@raeburn.org>
Sun, 5 Feb 2006 12:21:40 +0000 (12:21 +0000)
value to EMACS_INT, to suppress gcc warning.

src/ChangeLog
src/lisp.h

index bffe8caf089662192de9a216f1288d46bd4fdb06..4f411f954447d4cdc9f001a676fe4b2fe4810e87 100644 (file)
@@ -2,6 +2,9 @@
 
        * editfns.c (Fconstrain_to_field): Fix int/Lisp_Object mixup.
 
+       * lisp.h (XPNTR) [!NO_UNION_TYPE && !HAVE_SHM && !DATA_SEG_BITS]:
+       Cast bitfield value to EMACS_INT, to suppress gcc warning.
+
 2006-02-03  Kim F. Storm  <storm@cua.dk>
 
        * xdisp.c: Cache last merged escape glyph face.
index b8213c516cb0968ff8b8d156119a997f1b16a6a8..d930bd59a8de84db1f4472fad3b7013e5c9b3dff 100644 (file)
@@ -484,7 +484,11 @@ extern size_t pure_size;
    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 */