Allow empty struct-declaration-lists in spite of the N843 standard
This commit is contained in:
parent
698c0fd397
commit
37ff9e4277
12
src/parser.c
12
src/parser.c
@ -518,10 +518,14 @@ static int _struct_or_union_specifier(C99 * c99)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
ret |= scan(c99);
|
ret |= scan(c99);
|
||||||
ret |= _parse_check_set(c99, c99set_struct_declaration_list,
|
/* XXX the grammar says there's got to be one */
|
||||||
"struct declaration list", _struct_declaration_list);
|
if(_parse_in_set(c99, c99set_struct_declaration_list))
|
||||||
if(_parse_is_code(c99, C99_CODE_COMMA))
|
{
|
||||||
ret |= scan(c99);
|
ret |= _struct_declaration_list(c99);
|
||||||
|
/* XXX the grammar doesn't mention this? */
|
||||||
|
if(_parse_is_code(c99, C99_CODE_COMMA))
|
||||||
|
ret |= scan(c99);
|
||||||
|
}
|
||||||
ret |= _parse_check(c99, C99_CODE_OPERATOR_RBRACE);
|
ret |= _parse_check(c99, C99_CODE_OPERATOR_RBRACE);
|
||||||
ret |= code_context_set(c99->code, context);
|
ret |= code_context_set(c99->code, context);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user