Work around GCC bug in constexpr to attributes
__attribute__((aligned(MaxCacheLineSize))) triggers a GCC bug because enum {MaxCacheLineSize = 64 }; isn't constant enough. Adding zero to it makes it that much more constant.
R= stichnot@chromium.org
BUG= https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55382
Review URL: https://codereview.chromium.org/867483004
diff --git a/src/IceDefs.h b/src/IceDefs.h
index d327ea6..e7d97db 100644
--- a/src/IceDefs.h
+++ b/src/IceDefs.h
@@ -129,8 +129,10 @@
enum { MaxCacheLineSize = 64 };
// Use ICE_CACHELINE_BOUNDARY to force the next field in a declaration
// list to be aligned to the next cache line.
+// Note: zero is added to work around the following GCC 4.8 bug (fixed in 4.9):
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55382
#define ICE_CACHELINE_BOUNDARY \
- __attribute__((aligned(MaxCacheLineSize))) int : 0
+ __attribute__((aligned(MaxCacheLineSize + 0))) int : 0
// PNaCl is ILP32, so theoretically we should only need 32-bit offsets.
typedef int32_t RelocOffsetT;