(XPNTR) [!NO_UNION_TYPE && !HAVE_SHM && !DATA_SEG_BITS]: Cast bitfield

value to EMACS_INT, to suppress gcc warning.
This commit is contained in:
Ken Raeburn 2006-02-05 12:21:40 +00:00
parent d63b401895
commit 98950fd6ba
2 changed files with 8 additions and 1 deletions

View 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.

View 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 */