Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Fix alignment attributes not being emitted for arrays if the total size matched the alignment - #199

Merged
Vexu merged 1 commit into
ziglang:mainfrom
kcbanner:fixup_alignment
Oct 7, 2025
Merged

Fix alignment attributes not being emitted for arrays if the total size matched the alignment #199
Vexu merged 1 commit into
ziglang:mainfrom
kcbanner:fixup_alignment

Conversation

@kcbanner

@kcbanner kcbanner commented Oct 7, 2025

Copy link
Copy Markdown
Contributor

Change headFieldAlignment and alignmentForField to use alignof instead of looking at the total field size.

Previously, if the field size (in this case of the entire array) happened to match the requested alignment, then the alignment attribute was not emitted.

…instead of looking at the total field size.

Previously, if the field size (in this case of the entire array) happened to match the
requested alignment, then the alignment attribute was not emitted.
@Vexu
Vexu enabled auto-merge (rebase) October 7, 2025 19:10
@Vexu
Vexu merged commit 8eafe24 into ziglang:main Oct 7, 2025
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants