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.
This commit is contained in:
parent
206333ee30
commit
0002f31af9
2 changed files with 17 additions and 6 deletions
|
@ -1,5 +1,11 @@
|
|||
2015-01-08 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
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
|
||||
|
|
17
src/lisp.h
17
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"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue