Skip to content

Commit

Permalink
produce a more informative error message when parsing _Complex
Browse files Browse the repository at this point in the history
  • Loading branch information
noneofyourbusiness committed Oct 19, 2022
1 parent 878fccc commit 7d76420
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tccgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -4533,6 +4533,8 @@ static int parse_btype(CType *type, AttributeDef *ad, int ignore_label)
case TOK_BOOL:
u = VT_BOOL;
goto basic_type;
case TOK_COMPLEX:
tcc_error("_Complex is not yet supported");
case TOK_FLOAT:
u = VT_FLOAT;
goto basic_type;
Expand Down
1 change: 1 addition & 0 deletions tcctok.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
DEF(TOK_FLOAT, "float")
DEF(TOK_DOUBLE, "double")
DEF(TOK_BOOL, "_Bool")
DEF(TOK_COMPLEX, "_Complex")
DEF(TOK_SHORT, "short")
DEF(TOK_STRUCT, "struct")
DEF(TOK_UNION, "union")
Expand Down

0 comments on commit 7d76420

Please sign in to comment.