diff options
| author | Paul Eggert | 2017-11-13 10:06:50 -0800 |
|---|---|---|
| committer | Paul Eggert | 2017-11-13 10:16:52 -0800 |
| commit | 79108894dbcd642121466bb6af6c98c6a56e9233 (patch) | |
| tree | b80a341aba67fdf34056125407c79b5b0478668f /src/alloc.c | |
| parent | d14956099d0daf0faa132b20e0fb0d46cae001be (diff) | |
| download | emacs-79108894dbcd642121466bb6af6c98c6a56e9233.tar.gz emacs-79108894dbcd642121466bb6af6c98c6a56e9233.zip | |
Port to IBM xlc 12.01
Work around a compiler bug by using a separate enum for alignment.
* src/alloc.c (roundup_size): Declare in a separate enum.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/alloc.c b/src/alloc.c index 3b87195b707..88e24cfb736 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -2922,19 +2922,16 @@ set_next_vector (struct Lisp_Vector *v, struct Lisp_Vector *p) | |||
| 2922 | 2922 | ||
| 2923 | #define VECTOR_BLOCK_SIZE 4096 | 2923 | #define VECTOR_BLOCK_SIZE 4096 |
| 2924 | 2924 | ||
| 2925 | enum | 2925 | /* Alignment of struct Lisp_Vector objects. Because pseudovectors |
| 2926 | { | 2926 | can contain any C type, align at least as strictly as |
| 2927 | /* Alignment of struct Lisp_Vector objects. Because pseudovectors | 2927 | max_align_t. On x86 and x86-64 this can waste up to 8 bytes |
| 2928 | can contain any C type, align at least as strictly as | 2928 | for typical vectors, since alignof (max_align_t) is 16 but |
| 2929 | max_align_t. On x86 and x86-64 this can waste up to 8 bytes | 2929 | typical vectors need only an alignment of 8. However, it is |
| 2930 | for typical vectors, since alignof (max_align_t) is 16 but | 2930 | not worth the hassle to avoid wasting those bytes. */ |
| 2931 | typical vectors need only an alignment of 8. However, it is | 2931 | enum {vector_alignment = COMMON_MULTIPLE (alignof (max_align_t), GCALIGNMENT)}; |
| 2932 | not worth the hassle to avoid wasting those bytes. */ | 2932 | |
| 2933 | vector_alignment = COMMON_MULTIPLE (alignof (max_align_t), GCALIGNMENT), | 2933 | /* Vector size requests are a multiple of this. */ |
| 2934 | 2934 | enum { roundup_size = COMMON_MULTIPLE (vector_alignment, word_size) }; | |
| 2935 | /* Vector size requests are a multiple of this. */ | ||
| 2936 | roundup_size = COMMON_MULTIPLE (vector_alignment, word_size) | ||
| 2937 | }; | ||
| 2938 | 2935 | ||
| 2939 | /* Verify assumptions described above. */ | 2936 | /* Verify assumptions described above. */ |
| 2940 | verify (VECTOR_BLOCK_SIZE % roundup_size == 0); | 2937 | verify (VECTOR_BLOCK_SIZE % roundup_size == 0); |