aboutsummaryrefslogtreecommitdiff
path: root/src/check_stmt.cpp
diff options
context:
space:
mode:
authorCiD- <jkercher43@gmail.com>2022-03-14 13:36:22 -0400
committerCiD- <jkercher43@gmail.com>2022-03-14 13:36:22 -0400
commit1f4e5e919f94b53ea2ed9292b4a9a33488026fcf (patch)
treea073ea401866d4d4a1b83ea819de9c2c2e3893e2 /src/check_stmt.cpp
parentc293e88f2e31bfed896ddba701bdc2629497005a (diff)
parent1d147ba99339afbef47bf689a0e0d7591a33c633 (diff)
merge upstream/master
Diffstat (limited to 'src/check_stmt.cpp')
-rw-r--r--src/check_stmt.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp
index 7cae1893f..f2c830c1b 100644
--- a/src/check_stmt.cpp
+++ b/src/check_stmt.cpp
@@ -2152,7 +2152,6 @@ void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags) {
e->state = EntityState_Resolved;
}
ac.link_name = handle_link_name(ctx, e->token, ac.link_name, ac.link_prefix);
- e->Variable.thread_local_model = ac.thread_local_model;
if (ac.link_name.len > 0) {
e->Variable.link_name = ac.link_name;
@@ -2182,6 +2181,10 @@ void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags) {
}
e->Variable.thread_local_model = ac.thread_local_model;
}
+
+ if (is_arch_wasm() && e->Variable.thread_local_model.len != 0) {
+ error(e->token, "@(thread_local) is not supported for this target platform");
+ }
if (ac.is_static && ac.thread_local_model != "") {