From: Ken Raeburn Date: Sun, 5 Feb 2006 12:21:40 +0000 (+0000) Subject: (XPNTR) [!NO_UNION_TYPE && !HAVE_SHM && !DATA_SEG_BITS]: Cast bitfield X-Git-Tag: emacs-pretest-22.0.90~4363 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=98950fd6ba7f1460ceb548002caa75a92d593af3;p=emacs.git (XPNTR) [!NO_UNION_TYPE && !HAVE_SHM && !DATA_SEG_BITS]: Cast bitfield value to EMACS_INT, to suppress gcc warning. --- diff --git a/src/ChangeLog b/src/ChangeLog index bffe8caf089..4f411f95444 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 * xdisp.c: Cache last merged escape glyph face. diff --git a/src/lisp.h b/src/lisp.h index b8213c516cb..d930bd59a8d 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -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 */