Skip to content

Fix missing type cast for sizeof macro - #839

Open
Exanite wants to merge 4 commits into
dotnet:mainfrom
Exanite:dev/runtime-sizeof-windows
Open

Fix missing type cast for sizeof macro#839
Exanite wants to merge 4 commits into
dotnet:mainfrom
Exanite:dev/runtime-sizeof-windows

Conversation

@Exanite

@Exanite Exanite commented Aug 26, 2026

Copy link
Copy Markdown
Member

This fixes #836.

I only added ULongLong to the list of types that need a cast.
Let me know if any other types should be handled here.

My understanding is that we do not:
sizeof normally returns an int, so signed types are handled there.
Then unsigned is handled by the condition in the generator.
Everything else gets an explicit cast to the final type from int, or uint if the uint cast was also inserted.

@Exanite
Exanite marked this pull request as ready for review August 26, 2026 17:25
@Exanite
Exanite marked this pull request as draft August 26, 2026 17:26
@Exanite
Exanite marked this pull request as ready for review August 26, 2026 17:49
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.

Missing type cast for sizeof macro

1 participant