if (Tok != TOK_SEP) {
Multiplicator = ConstExpression ();
if (Multiplicator <= 0) {
- Error ("Range error");
+ ErrorSkip ("Range error");
Multiplicator = 1;
}
AllocSize *= Multiplicator;
/* Check the size for a reasonable value */
if (AllocSize >= 0x10000) {
- Error ("Range error");
+ ErrorSkip ("Range error");
}
/* Return the size */
break;
case TOK_RES:
+ NextTok ();
if (Tok == TOK_SEP) {
- Error ("Size is missing");
+ ErrorSkip ("Size is missing");
} else {
MemberSize = Member (1);
}
NextTok ();
Struct = ParseScopedSymTable ();
if (Struct == 0) {
- Error ("Unknown struct/union");
+ ErrorSkip ("Unknown struct/union");
} else if (GetSymTabType (Struct) != ST_STRUCT) {
- Error ("Not a struct/union");
+ ErrorSkip ("Not a struct/union");
} else {
SymEntry* SizeSym = GetSizeOfScope (Struct);
if (!SymIsDef (SizeSym) || !SymIsConst (SizeSym, &MemberSize)) {
- Error ("Size of struct/union is unknown");
+ ErrorSkip ("Size of struct/union is unknown");
}
}
- MemberSize *= Member (MemberSize);
+ MemberSize = Member (MemberSize);
break;
case TOK_STRUCT: