aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schwab2018-08-12 11:03:36 +0200
committerAndreas Schwab2018-08-12 11:12:27 +0200
commit3d0a0ca7ca58cdb8f07be63df28ad30e4367167d (patch)
treedc694b1eea3a83f134c5dddc0f079c3bdf6d58ad
parent3fc948a36c0f70f73d2e8eb688b1599fa6b73036 (diff)
downloademacs-3d0a0ca7ca58cdb8f07be63df28ad30e4367167d.tar.gz
emacs-3d0a0ca7ca58cdb8f07be63df28ad30e4367167d.zip
Avoid padding after union vectorlike_header
The PSEUDOVECTORSIZE macro requires that the first member after union vectorlike_header has the same offset in all pseudo vector structures. * src/lisp.h (GCALIGNMENT) [!USE_LSB_TAG]: Use alignment of Lisp_Object.
-rw-r--r--src/lisp.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lisp.h b/src/lisp.h
index dcc157e0b96..96256386218 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -276,15 +276,17 @@ error !;
276 276
277/* Minimum alignment requirement for Lisp objects, imposed by the 277/* Minimum alignment requirement for Lisp objects, imposed by the
278 internal representation of tagged pointers. It is 2**GCTYPEBITS if 278 internal representation of tagged pointers. It is 2**GCTYPEBITS if
279 USE_LSB_TAG, 1 otherwise. It must be a literal integer constant, 279 USE_LSB_TAG, otherwise the alignment of Lisp_Object to avoid
280 for older versions of GCC (through at least 4.9). */ 280 padding after union vectorlike_header. It must be a literal
281 integer constant, for older versions of GCC (through at least
282 4.9). */
281#if USE_LSB_TAG 283#if USE_LSB_TAG
282# define GCALIGNMENT 8 284# define GCALIGNMENT 8
283# if GCALIGNMENT != 1 << GCTYPEBITS 285# if GCALIGNMENT != 1 << GCTYPEBITS
284# error "GCALIGNMENT and GCTYPEBITS are inconsistent" 286# error "GCALIGNMENT and GCTYPEBITS are inconsistent"
285# endif 287# endif
286#else 288#else
287# define GCALIGNMENT 1 289# define GCALIGNMENT alignof (Lisp_Object)
288#endif 290#endif
289 291
290#define GCALIGNED_UNION char alignas (GCALIGNMENT) gcaligned; 292#define GCALIGNED_UNION char alignas (GCALIGNMENT) gcaligned;