1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-26 20:29:34 +00:00

Fixed flexible array struct members.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4131 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2009-09-08 07:55:44 +00:00
parent 9f7ca16001
commit 331803126f

View File

@ -723,8 +723,8 @@ static SymEntry* ParseStructDecl (const char* Name)
}
/* Add a field entry to the table */
if (FieldWidth > 0) {
/* Add full byte from the bit offset to the variable offset.
if (FieldWidth > 0) {
/* Add full byte from the bit offset to the variable offset.
* This simplifies handling he bit-field as a char type
* in expressions.
*/
@ -738,7 +738,9 @@ static SymEntry* ParseStructDecl (const char* Name)
}
} else {
AddLocalSym (Decl.Ident, Decl.Type, SC_STRUCTFIELD, StructSize);
StructSize += CheckedSizeOf (Decl.Type);
if (!FlexibleMember) {
StructSize += CheckedSizeOf (Decl.Type);
}
}
NextMember: if (CurTok.Tok != TOK_COMMA) {