aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorPaul Eggert2014-12-12 17:51:03 -0800
committerPaul Eggert2014-12-12 17:54:02 -0800
commit7fc616afcfbaebea1658149da269110da94d6e59 (patch)
treefdf883b06477996b4705ebe64fa08795fa3e9715 /src/alloc.c
parent67a48edb27172ae78182b13edf18789c2c79b7ac (diff)
downloademacs-7fc616afcfbaebea1658149da269110da94d6e59.tar.gz
emacs-7fc616afcfbaebea1658149da269110da94d6e59.zip
Replace union hack with C11-style max_align_t
* admin/merge-gnulib (GNULIB_MODULES): Add stddef, for max_align_t. * lib/gnulib.mk: Regenerate. * src/alloc.c (XMALLOC_BASE_ALIGNMENT): Use max_align_t instead of a hack involving a union.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 35a5ee2784f..43287457c8d 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -534,8 +534,7 @@ buffer_memory_full (ptrdiff_t nbytes)
534/* Define XMALLOC_OVERRUN_SIZE_SIZE so that (1) it's large enough to 534/* Define XMALLOC_OVERRUN_SIZE_SIZE so that (1) it's large enough to
535 hold a size_t value and (2) the header size is a multiple of the 535 hold a size_t value and (2) the header size is a multiple of the
536 alignment that Emacs needs for C types and for USE_LSB_TAG. */ 536 alignment that Emacs needs for C types and for USE_LSB_TAG. */
537#define XMALLOC_BASE_ALIGNMENT \ 537#define XMALLOC_BASE_ALIGNMENT alignof (max_align_t)
538 alignof (union { long double d; intmax_t i; void *p; })
539 538
540#if USE_LSB_TAG 539#if USE_LSB_TAG
541# define XMALLOC_HEADER_ALIGNMENT \ 540# define XMALLOC_HEADER_ALIGNMENT \