Skip to content

[AST] Explicitly cast uint64_t to size_t for 32-bit platforms #79340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

kateinoigakukun
Copy link
Member

@kateinoigakukun kateinoigakukun commented Feb 13, 2025

There are a few places in the AST where we use uint64_t as ArrayRef's size type. Even though of these uint64_t size fields are actually defined as bitfields with a maximum value of 32, but unfortunately it's not taken into account and clang complains about the implicit cast.

The same attempt was made in 073905b, but several new places were added since then.

This is a part of work to port the compiler to Emscripten platform.

There are a few places in the AST where we use `uint64_t` as
`ArrayRef`'s size type. Even though of these `uint64_t` size fields are
actually defined as bitfields with a maximum value of 32, but
unfortunately it's not taken into account and clang complains about
the implicit cast.

The same attempt was made in 073905b,
but several new places were added since then.
@kateinoigakukun
Copy link
Member Author

@swift-ci smoke test

@kateinoigakukun
Copy link
Member Author

@swift-ci smoke test

@kateinoigakukun kateinoigakukun merged commit 3745dd1 into swiftlang:main Feb 13, 2025
3 checks passed
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.

1 participant