diff options
| author | Paul Eggert | 2014-10-08 23:54:10 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-10-08 23:54:10 -0700 |
| commit | 8881986b3e227f46d8a7d6766b41802bcfc2517c (patch) | |
| tree | 89554207e1e0b778a7ba75ca23e39238333289a5 /src/lisp.h | |
| parent | 32ade3f01a0185f2a836c313d9d50564abe4e254 (diff) | |
| download | emacs-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
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 7 |
1 files changed, 5 insertions, 2 deletions
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 | ||
| 4620 | enum | 4623 | enum |
| 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 | ||