aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/lisp.h b/src/lisp.h
index b6ae2dcd073..7c3c1f3780e 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -267,7 +267,9 @@ union Lisp_Object
267 267
268 struct 268 struct
269 { 269 {
270 EMACS_INT val : VALBITS; 270 /* Use explict signed, the signedness of a bit-field of type
271 int is implementation defined. */
272 signed EMACS_INT val : VALBITS;
271 enum Lisp_Type type : GCTYPEBITS; 273 enum Lisp_Type type : GCTYPEBITS;
272 } s; 274 } s;
273 struct 275 struct
@@ -290,7 +292,9 @@ union Lisp_Object
290 struct 292 struct
291 { 293 {
292 enum Lisp_Type type : GCTYPEBITS; 294 enum Lisp_Type type : GCTYPEBITS;
293 EMACS_INT val : VALBITS; 295 /* Use explict signed, the signedness of a bit-field of type
296 int is implementation defined. */
297 signed EMACS_INT val : VALBITS;
294 } s; 298 } s;
295 struct 299 struct
296 { 300 {
@@ -447,20 +451,8 @@ enum pvec_type
447#endif 451#endif
448 452
449#define XHASH(a) ((a).i) 453#define XHASH(a) ((a).i)
450
451#define XTYPE(a) ((enum Lisp_Type) (a).u.type) 454#define XTYPE(a) ((enum Lisp_Type) (a).u.type)
452
453#ifdef EXPLICIT_SIGN_EXTEND
454/* Make sure we sign-extend; compilers have been known to fail to do so.
455 We additionally cast to EMACS_INT since it seems that some compilers
456 have been known to fail to do so, even though the bitfield is declared
457 as EMACS_INT already. */
458#define XINT(a) ((((EMACS_INT) (a).s.val) << (BITS_PER_EMACS_INT - VALBITS)) \
459 >> (BITS_PER_EMACS_INT - VALBITS))
460#else
461#define XINT(a) ((a).s.val) 455#define XINT(a) ((a).s.val)
462#endif /* EXPLICIT_SIGN_EXTEND */
463
464#define XUINT(a) ((a).u.val) 456#define XUINT(a) ((a).u.val)
465 457
466#ifdef USE_LSB_TAG 458#ifdef USE_LSB_TAG