]> git.eshelyaron.com Git - emacs.git/commitdiff
Port to IBM xlc 12.01
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Nov 2017 18:06:50 +0000 (10:06 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Nov 2017 18:16:52 +0000 (10:16 -0800)
Work around a compiler bug by using a separate enum for alignment.
* src/alloc.c (roundup_size): Declare in a separate enum.

src/alloc.c

index 3b87195b707f7e3c90ca095c805cc929b495e6bc..88e24cfb736a72c37372033596f050e4bf78882f 100644 (file)
@@ -2922,19 +2922,16 @@ set_next_vector (struct Lisp_Vector *v, struct Lisp_Vector *p)
 
 #define VECTOR_BLOCK_SIZE 4096
 
-enum
-  {
-    /* Alignment of struct Lisp_Vector objects.  Because pseudovectors
-       can contain any C type, align at least as strictly as
-       max_align_t.  On x86 and x86-64 this can waste up to 8 bytes
-       for typical vectors, since alignof (max_align_t) is 16 but
-       typical vectors need only an alignment of 8.  However, it is
-       not worth the hassle to avoid wasting those bytes.  */
-    vector_alignment = COMMON_MULTIPLE (alignof (max_align_t), GCALIGNMENT),
-
-    /* Vector size requests are a multiple of this.  */
-    roundup_size = COMMON_MULTIPLE (vector_alignment, word_size)
-  };
+/* Alignment of struct Lisp_Vector objects.  Because pseudovectors
+   can contain any C type, align at least as strictly as
+   max_align_t.  On x86 and x86-64 this can waste up to 8 bytes
+   for typical vectors, since alignof (max_align_t) is 16 but
+   typical vectors need only an alignment of 8.  However, it is
+   not worth the hassle to avoid wasting those bytes.  */
+enum {vector_alignment = COMMON_MULTIPLE (alignof (max_align_t), GCALIGNMENT)};
+
+/* Vector size requests are a multiple of this.  */
+enum { roundup_size = COMMON_MULTIPLE (vector_alignment, word_size) };
 
 /* Verify assumptions described above.  */
 verify (VECTOR_BLOCK_SIZE % roundup_size == 0);