produce a more informative error message when parsing _Complex

This commit is contained in:
noneofyourbusiness 2022-10-19 14:06:04 +02:00
parent 878fcccdb2
commit 7d76420857
No known key found for this signature in database
GPG key ID: FF810A8659912F5A
2 changed files with 3 additions and 0 deletions

View file

@ -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;

View file

@ -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")