History

produce a more informative error message when _Thread_local is used

noneofyourbusiness committed 3 years ago

Commit ab39d341 parent 894e1662 files · +3 −0Browse files

Unified · Split

2 files
  1. tccgen.c +2 −0
  2. tcctok.h +1 −0
tccgen.c+2−0
@@ -4662,6 +4662,8 @@ static int parse_btype(CType *type, AttributeDef *ad, int ignore_label) · 4661 unmodified lines
4662 if (type1.ref)4662 if (type1.ref)
4663 sym_to_attr(ad, type1.ref);4663 sym_to_attr(ad, type1.ref);
4664 goto basic_type2;4664 goto basic_type2;
4665 case TOK_THREAD_LOCAL:
4666 tcc_error("_Thread_local is not implemented");
4665 default:4667 default:
4666 if (typespec_found)4668 if (typespec_found)
4667 goto the_end;4669 goto the_end;
tcctok.h+1−0
@@ -38,6 +38,7 @@ · 37 unmodified lines
38 DEF(TOK_RESTRICT2, "__restrict")38 DEF(TOK_RESTRICT2, "__restrict")
39 DEF(TOK_RESTRICT3, "__restrict__")39 DEF(TOK_RESTRICT3, "__restrict__")
40 DEF(TOK_EXTENSION, "__extension__") /* gcc keyword */40 DEF(TOK_EXTENSION, "__extension__") /* gcc keyword */
41 DEF(TOK_THREAD_LOCAL, "_Thread_local") /* C11 thread-local storage */
41 42
42 DEF(TOK_GENERIC, "_Generic")43 DEF(TOK_GENERIC, "_Generic")
43 DEF(TOK_STATIC_ASSERT, "_Static_assert")44 DEF(TOK_STATIC_ASSERT, "_Static_assert")

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t