From: Eric Wong Date: 2014-01-04T00:10:50+00:00 Subject: [ruby-core:59541] Re: [ruby-trunk - Feature #9362][Assigned] Minimize cache misshit to gain optimal speed Hi, I noticed a trivial typo in array.c, and it fails building struct.c and array.c on 32-bit x86 (with 64-byte cache line). --- a/array.c +++ b/array.c @@ -28,7 +28,7 @@ VALUE rb_cArray; static ID id_cmp, id_div, id_power; -STATIC_ASSERT(rbarray_embed_len_max, RARRAY_EMBED_LEN_MAX <= (RARRAY_EMBED_LEN_MASK >>_ RSTRUCT_EMBED_LEN_SHIFT)); +STATIC_ASSERT(rbarray_embed_len_max, RARRAY_EMBED_LEN_MAX <= (RARRAY_EMBED_LEN_MASK >> RARRAY_EMBED_LEN_SHIFT)); #define ARY_DEFAULT_SIZE 16 #define ARY_MAX_SIZE (LONG_MAX / (int)sizeof(VALUE)) -------- 3 bits for embedded array/struct length does not seem to be enough :< gcc version 4.7.2 (Debian 4.7.2-5) compiling struct.c compiling version.c array.c:31:1: error: size of array ���static_assert_rbarray_embed_len_max_check��� is negative struct.c:15:1: error: size of array ���static_assert_rbstruct_embed_len_max_check��� is negative