From: Paul Eggert Date: Thu, 9 Oct 2014 06:54:10 +0000 (-0700) Subject: * lisp.h (USE_STACK_STRING): Now true only if USE_STACK CONS. X-Git-Tag: emacs-25.0.90~2635^2~679^2~91 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8881986b3e227f46d8a7d6766b41802bcfc2517c;p=emacs.git * lisp.h (USE_STACK_STRING): Now true only if USE_STACK CONS. On x86 platforms this works around GCC bug 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 --- diff --git a/src/ChangeLog b/src/ChangeLog index e01c70f3dce..a38df05518d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2014-10-09 Paul Eggert + + * lisp.h (USE_STACK_STRING): Now true only if USE_STACK CONS. + On x86 platforms this works around GCC bug 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 + 2014-10-08 Leo Liu 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 double d; intmax_t i; void *p; }; -/* True for stack-based cons and string implementations. */ +/* True for stack-based cons and string implementations, respectively. + Use stack-based strings only if stack-based cons also works. + Otherwise, STACK_CONS would create heap-based cons cells that + could point to stack-based strings, which is a no-no. */ enum { USE_STACK_CONS = (USE_STACK_LISP_OBJECTS && alignof (union Aligned_Cons) % GCALIGNMENT == 0), - USE_STACK_STRING = (USE_STACK_LISP_OBJECTS + USE_STACK_STRING = (USE_STACK_CONS && alignof (union Aligned_String) % GCALIGNMENT == 0) };