Skip to content

Commit

Permalink
Support attributes after identifiers in enums
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Sep 17, 2024
1 parent ddf0f6c commit 6d70997
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tccgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -4393,6 +4393,9 @@ static void struct_decl(CType *type, int u)
tcc_error("redefinition of enumerator '%s'",
get_tok_str(v, NULL));
next();
if (tok == TOK_ATTRIBUTE1 || tok == TOK_ATTRIBUTE2) {
parse_attribute(&ad1);
}
if (tok == '=') {
next();
ll = expr_const64();
Expand Down

0 comments on commit 6d70997

Please sign in to comment.