--- a/c2iec.y +++ b/c2iec.y @@ -338,6 +338,13 @@ | struct_or_union IDENTIFIER ; +unnamed_struct_or_union_specifier + : struct_or_union '{' struct_declaration_list '}' + { + strcpy($<str>$, $<str>3); + } + ; + struct_or_union : STRUCT | UNION @@ -361,6 +368,7 @@ // strcpy($<str>$, ""); } } + | unnamed_struct_or_union_specifier ';' ; specifier_qualifier_list