Changed maximum force_align to match the C++ code generator.

Change-Id: I7df2b0172f5de6f7bdbd8778361794004cd06062
Tested: on Linux.
parent 210c0ece
...@@ -918,10 +918,10 @@ void Parser::ParseDecl() { ...@@ -918,10 +918,10 @@ void Parser::ParseDecl() {
auto align = static_cast<size_t>(atoi(force_align->constant.c_str())); auto align = static_cast<size_t>(atoi(force_align->constant.c_str()));
if (force_align->type.base_type != BASE_TYPE_INT || if (force_align->type.base_type != BASE_TYPE_INT ||
align < struct_def.minalign || align < struct_def.minalign ||
align > 256 || align > 16 ||
align & (align - 1)) align & (align - 1))
Error("force_align must be a power of two integer ranging from the" Error("force_align must be a power of two integer ranging from the"
"struct\'s natural alignment to 256"); "struct\'s natural alignment to 16");
struct_def.minalign = align; struct_def.minalign = align;
} }
struct_def.PadLastField(struct_def.minalign); struct_def.PadLastField(struct_def.minalign);
......
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