From 7d7642085774e62851b7743de6b7b92466d01e5b Mon Sep 17 00:00:00 2001 From: noneofyourbusiness Date: Wed, 19 Oct 2022 14:06:04 +0200 Subject: [PATCH] produce a more informative error message when parsing _Complex --- tccgen.c | 2 ++ tcctok.h | 1 + 2 files changed, 3 insertions(+) diff --git a/tccgen.c b/tccgen.c index 2f5214ec..6566ee4f 100644 --- a/tccgen.c +++ b/tccgen.c @@ -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; diff --git a/tcctok.h b/tcctok.h index 52a6e0cc..563984a3 100644 --- a/tcctok.h +++ b/tcctok.h @@ -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")