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:
gingerBill committed 2026-10-07 15:54:21 +01:00
1 parent 30f80e1079
commit 5ff7268cab
8 files changed
+35 -5

No files matched your search

+1
View File
@@ -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");