From: Paul Eggert Date: Thu, 8 Jan 2015 08:41:17 +0000 (-0800) Subject: Port new Lisp symbol init to x86 --with-wide-int X-Git-Tag: emacs-25.0.90~2605^2~22 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0002f31af9d3511b00eaa15590ba824acea99f25;p=emacs.git Port new Lisp symbol init to x86 --with-wide-int * lisp.h (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END): Define to empty on platforms where EMACS_INT_MAX != INTPTR_MAX, as GCC (at least) does not allow a constant initializer to widen an address constant. --- diff --git a/src/ChangeLog b/src/ChangeLog index 33030cb8660..d2ae0262171 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2015-01-08 Paul Eggert + Port new Lisp symbol init to x86 --with-wide-int + * lisp.h (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END): + Define to empty on platforms where EMACS_INT_MAX != INTPTR_MAX, as + GCC (at least) does not allow a constant initializer to widen an + address constant. + * lisp.h (TAG_SYMPTR): Don't do arithmetic on NULL. This is a followup to the "Port Qnil==0 XUNTAG to clang" patch. Although clang doesn't need it, some other compiler might, and diff --git a/src/lisp.h b/src/lisp.h index 97abaade1e1..5a4198ef683 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -734,12 +734,17 @@ struct Lisp_Symbol /* Declare extern constants for Lisp symbols. These can be helpful when using a debugger like GDB, on older platforms where the debug - format does not represent C macros. Athough these symbols are - useless on modern platforms, they don't hurt performance all that much. */ -#define DEFINE_LISP_SYMBOL_BEGIN(name) \ - DEFINE_GDB_SYMBOL_BEGIN (Lisp_Object, name) -#define DEFINE_LISP_SYMBOL_END(name) \ - DEFINE_GDB_SYMBOL_END (LISP_INITIALLY (TAG_SYMPTR (name))) + format does not represent C macros. However, they don't work with + GCC if INTPTR_MAX != EMACS_INT_MAX. */ +#if EMACS_INT_MAX == INTPTR_MAX +# define DEFINE_LISP_SYMBOL_BEGIN(name) \ + DEFINE_GDB_SYMBOL_BEGIN (Lisp_Object, name) +# define DEFINE_LISP_SYMBOL_END(name) \ + DEFINE_GDB_SYMBOL_END (LISP_INITIALLY (TAG_SYMPTR (name))) +#else +# define DEFINE_LISP_SYMBOL_BEGIN(name) /* empty */ +# define DEFINE_LISP_SYMBOL_END(name) /* empty */ +#endif #include "globals.h"