Commit 867684e2 by JF Bastien

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
parent c34190c2
......@@ -129,8 +129,10 @@ typedef uint32_t TimerIdT;
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment