Open GoogleCodeExporter opened 9 years ago
The problem comes from the union is unnamed.
The method responsible for parsing unions/structs which should handle this is
parser::__struct_declaration() in parser.cpp but it contains a single rule:
MATCH3(specifier_qualifier_list, struct_declarator_list, token<';'>)
In the case of an unnamed union there is no struct_declarator_list. When only 1
or 2 elements are matched, it doesn't quit with an error and rolls back to the
"union" word which doesn't match the '}' expected to end the struct definition.
There are 2 things to be fixed here:
* handle the case where struct_declarator_list is missing
* when only specifier_qualifier_list is matched quit with an error
struct_type doesn't handle unnamed unions, it needs to be implemented (using
empty member names should work without too much troubles).
Original comment by zuzu...@gmail.com
on 2 Mar 2015 at 10:13
Original issue reported on code.google.com by
sctinc...@gmail.com
on 2 Mar 2015 at 5:14