Improve error messages for some wrong constant value attributes

This commit is contained in:
gingerBill
2024-03-24 13:36:50 +00:00
parent 590e52cc05
commit 87688936c6
+9
View File
@@ -3666,6 +3666,15 @@ gb_internal DECL_ATTRIBUTE_PROC(const_decl_attribute) {
} else if (name == "private") {
// NOTE(bill): Handled elsewhere `check_collect_value_decl`
return true;
} else if (name == "static" ||
name == "thread_local" ||
name == "require" ||
name == "linkage" ||
name == "link_name" ||
name == "link_prefix" ||
false) {
error(elem, "@(%.*s) is not supported for compile time constant value declarations", LIT(name));
return true;
}
return false;
}