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

Change-Id: I7df2b0172f5de6f7bdbd8778361794004cd06062
Tested: on Linux.
This commit is contained in:
Wouter van Oortmerssen
2015-08-05 13:56:31 -07:00
parent 210c0ece54
commit 45cc503bbd

View File

@@ -918,10 +918,10 @@ void Parser::ParseDecl() {
auto align = static_cast<size_t>(atoi(force_align->constant.c_str()));
if (force_align->type.base_type != BASE_TYPE_INT ||
align < struct_def.minalign ||
align > 256 ||
align > 16 ||
align & (align - 1))
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.PadLastField(struct_def.minalign);