Sorry message for union declarations.

This commit is contained in:
Stephen Williams 2013-11-22 10:39:48 -08:00
parent 0692cd54e7
commit be7d763352
1 changed files with 17 additions and 1 deletions

18
parse.y
View File

@ -2262,8 +2262,24 @@ struct_data_type
tmp->members .reset($4);
$$ = tmp;
}
| K_union K_packed_opt '{' struct_union_member_list '}'
{ struct_type_t*tmp = new struct_type_t;
FILE_NAME(tmp, @1);
tmp->packed_flag = $2;
tmp->members .reset($4);
$$ = tmp;
yyerror(@4, "sorry: union data type not implemented.");
}
| K_struct K_packed_opt '{' error '}'
{ yyerror(@4, "error: Errors in struct/union member list.");
{ yyerror(@4, "error: Errors in struct member list.");
yyerrok;
struct_type_t*tmp = new struct_type_t;
FILE_NAME(tmp, @1);
tmp->packed_flag = $2;
$$ = tmp;
}
| K_union K_packed_opt '{' error '}'
{ yyerror(@4, "error: Errors in union member list.");
yyerrok;
struct_type_t*tmp = new struct_type_t;
FILE_NAME(tmp, @1);