* 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
This commit is contained in:
Paul Eggert 2014-10-08 23:54:10 -07:00
parent 32ade3f01a
commit 8881986b3e
2 changed files with 14 additions and 2 deletions

View file

@ -1,3 +1,12 @@
2014-10-09 Paul Eggert <eggert@cs.ucla.edu>
* 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
2014-10-08 Leo Liu <sdl.web@gmail.com>
Enhance terpri to allow conditionally output a newline. (Bug#18652)

View file

@ -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)
};