mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-19 01:01:31 -07:00
Improve error messages for some wrong constant value attributes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user