Skip to content

TypeStore: round record size up to alignment for MSVC#1068

Merged
Vexu merged 3 commits into
Vexu:masterfrom
ehaas:msvc-aligned-struct-size
Jul 5, 2026
Merged

TypeStore: round record size up to alignment for MSVC#1068
Vexu merged 3 commits into
Vexu:masterfrom
ehaas:msvc-aligned-struct-size

Conversation

@ehaas

@ehaas ehaas commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

This regresses 3 record tests but brings the overall number of failing ones down to 61. I included the msvc-enum branch just to avoid conflicts, #1067 should be merged first.

int x;
} AlignedStruct;

_Static_assert(_Alignof(AlignedStruct) == 16, "");

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test case that only works with this change applied?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, I was testing a bunch of combos and used the wrong one - I rebased and switched it so the __declspec is before the typedef

@ehaas ehaas force-pushed the msvc-aligned-struct-size branch from 9fd79e9 to 05e2224 Compare July 4, 2026 15:36
@ehaas

ehaas commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator Author

Pushed a few more fixes - prevent underaligned enums in msvc and a fix for record alignment through multiple layers of typedefs

@Vexu Vexu merged commit d752e77 into Vexu:master Jul 5, 2026
3 checks passed
@ehaas ehaas deleted the msvc-aligned-struct-size branch July 5, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants