diff --git a/tccgen.c b/tccgen.c index bdaaf129..7bae6aee 100644 --- a/tccgen.c +++ b/tccgen.c @@ -4662,6 +4662,8 @@ static int parse_btype(CType *type, AttributeDef *ad, int ignore_label) if (type1.ref) sym_to_attr(ad, type1.ref); goto basic_type2; + case TOK_THREAD_LOCAL: + tcc_error("_Thread_local is not implemented"); default: if (typespec_found) goto the_end; diff --git a/tcctok.h b/tcctok.h index 563984a3..9936d2ef 100644 --- a/tcctok.h +++ b/tcctok.h @@ -38,6 +38,7 @@ DEF(TOK_RESTRICT2, "__restrict") DEF(TOK_RESTRICT3, "__restrict__") DEF(TOK_EXTENSION, "__extension__") /* gcc keyword */ + DEF(TOK_THREAD_LOCAL, "_Thread_local") /* C11 thread-local storage */ DEF(TOK_GENERIC, "_Generic") DEF(TOK_STATIC_ASSERT, "_Static_assert")