From 6b08ad5263bc063c79666ffe2bd5ed9ab77a00a0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 2 Nov 2017 13:06:38 -0700 Subject: Fix alignment portability problems Do not assume that the natural alignment of Lisp objects is a multiple of GCALIGNMENT. This improves on the portability of the recent fix for Bug#29040. * lib-src/make-docfile.c (close_emacs_globals): * src/buffer.c (buffer_defaults, buffer_local_symbols): * src/lisp.h (DEFUN): * src/thread.c (main_thread): Use GCALIGNED, not alignas (GCALIGNMENT). * src/alloc.c (COMMON_MULTIPLE): Move back here from lisp.h, since it is no longer used elsewhere. * src/lisp.h (GCALIGNMENT): No longer a macro, since we need not worry about MSVC. Omit no-longer-needed consistency check. * src/thread.c (THREAD_ALIGNMENT): Remove. --- lib-src/make-docfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib-src') diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 69c7f37a17a..0ea3f7b6b6a 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -668,7 +668,7 @@ close_emacs_globals (ptrdiff_t num_symbols) "extern\n" "#endif\n" "struct {\n" - " struct Lisp_Symbol alignas (GCALIGNMENT) s;\n" + " struct Lisp_Symbol GCALIGNED s;\n" "} lispsym[%td];\n"), num_symbols); } -- cgit v1.2.1