Add #field_align(N)

It sets the minimum alignment for the fields within a struct. This cannot be used with `#packed`, but can be used with `#align(N)`.
If `#align(N)` is less than `#field_align(N)`, then a warning will be printed.
This commit is contained in:
gingerBill
2024-01-28 17:33:29 +00:00
parent c1d853a24e
commit 68df35b378
6 changed files with 64 additions and 24 deletions
+1
View File
@@ -768,6 +768,7 @@ Struct_Type :: struct {
tok_pos: tokenizer.Pos,
poly_params: ^Field_List,
align: ^Expr,
field_align: ^Expr,
where_token: tokenizer.Token,
where_clauses: []^Expr,
is_packed: bool,