mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-08 22:01:47 -04:00
Add @(align=N) for variables, raising the alignment of globals, locals, @(static) and @(thread_local) variables to at least N
This commit is contained in:
1 parent
30f80e1079
commit
5ff7268cab
8 files changed
+35
-5
No files matched your search
@@ -1753,6 +1753,7 @@ gb_internal void check_global_variable_decl(CheckerContext *ctx, Entity *e, Ast
|
||||
|
||||
e->Variable.thread_local_model = ac.thread_local_model;
|
||||
e->Variable.is_export = ac.is_export;
|
||||
e->Variable.custom_align = ac.align;
|
||||
e->flags &= ~EntityFlag_Static;
|
||||
if (ac.is_static) {
|
||||
error(e->token, "@(static) is not supported for global variables, nor required");
|
||||
|
||||
Reference in new issue
Block a user