aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2014-10-08 23:54:10 -0700
committerPaul Eggert2014-10-08 23:54:10 -0700
commit8881986b3e227f46d8a7d6766b41802bcfc2517c (patch)
tree89554207e1e0b778a7ba75ca23e39238333289a5
parent32ade3f01a0185f2a836c313d9d50564abe4e254 (diff)
downloademacs-8881986b3e227f46d8a7d6766b41802bcfc2517c.tar.gz
emacs-8881986b3e227f46d8a7d6766b41802bcfc2517c.zip
* lisp.h (USE_STACK_STRING): Now true only if USE_STACK CONS.
On x86 platforms this works around GCC bug 63495 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63495>, and more generally should fix a portability problem in Emacs. Problem reported by Stefan Monnier in: http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00261.html
-rw-r--r--src/ChangeLog9
-rw-r--r--src/lisp.h7
2 files changed, 14 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e01c70f3dce..a38df05518d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12014-10-09 Paul Eggert <eggert@cs.ucla.edu>
2
3 * lisp.h (USE_STACK_STRING): Now true only if USE_STACK CONS.
4 On x86 platforms this works around GCC bug 63495
5 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63495>,
6 and more generally should fix a portability problem in Emacs.
7 Problem reported by Stefan Monnier in:
8 http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00261.html
9
12014-10-08 Leo Liu <sdl.web@gmail.com> 102014-10-08 Leo Liu <sdl.web@gmail.com>
2 11
3 Enhance terpri to allow conditionally output a newline. (Bug#18652) 12 Enhance terpri to allow conditionally output a newline. (Bug#18652)
diff --git a/src/lisp.h b/src/lisp.h
index 0425744b301..9e4cc5fdc53 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -4615,13 +4615,16 @@ union Aligned_String
4615 double d; intmax_t i; void *p; 4615 double d; intmax_t i; void *p;
4616}; 4616};
4617 4617
4618/* True for stack-based cons and string implementations. */ 4618/* True for stack-based cons and string implementations, respectively.
4619 Use stack-based strings only if stack-based cons also works.
4620 Otherwise, STACK_CONS would create heap-based cons cells that
4621 could point to stack-based strings, which is a no-no. */
4619 4622
4620enum 4623enum
4621 { 4624 {
4622 USE_STACK_CONS = (USE_STACK_LISP_OBJECTS 4625 USE_STACK_CONS = (USE_STACK_LISP_OBJECTS
4623 && alignof (union Aligned_Cons) % GCALIGNMENT == 0), 4626 && alignof (union Aligned_Cons) % GCALIGNMENT == 0),
4624 USE_STACK_STRING = (USE_STACK_LISP_OBJECTS 4627 USE_STACK_STRING = (USE_STACK_CONS
4625 && alignof (union Aligned_String) % GCALIGNMENT == 0) 4628 && alignof (union Aligned_String) % GCALIGNMENT == 0)
4626 }; 4629 };
4627 4630