diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2015-01-07 23:39:56 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-01-07 23:40:20 -0800 |
commit | 206333ee300408e24bca860287efba11326a990d (patch) | |
tree | 36292bc82e381944e188e43841bebaecade39a99 | |
parent | ce5c361c14c3fd5c06d48aa1c4bfa05c47c249f0 (diff) | |
download | emacs-206333ee300408e24bca860287efba11326a990d.tar.gz |
* 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
it's easy enough to be safe.
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/lisp.h | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 7a98555cc9c..33030cb8660 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2015-01-08 Paul Eggert <eggert@cs.ucla.edu> + * 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 + it's easy enough to be safe. + * conf_post.h (ATTRIBUTE_ALLOC_SIZE): Port to clang 3.5.0. Apparently clang removed support for the alloc_size attribute. diff --git a/src/lisp.h b/src/lisp.h index b9263f88c11..97abaade1e1 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -729,7 +729,8 @@ struct Lisp_Symbol /* Yield an integer that tags PTR as a symbol. */ #define TAG_SYMPTR(ptr) \ - TAG_PTR (Lisp_Symbol, (char *) (ptr) - (char *) (USE_LSB_TAG ? lispsym : 0)) + TAG_PTR (Lisp_Symbol, \ + USE_LSB_TAG ? (char *) (ptr) - (char *) lispsym : (intptr_t) (ptr)) /* Declare extern constants for Lisp symbols. These can be helpful when using a debugger like GDB, on older platforms where the debug |