Skip to content

Static_cast std::size_t to build flang_rt in 32-bit. #149529

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

Merged
merged 2 commits into from
Jul 18, 2025

Conversation

DanielCChen
Copy link
Contributor

No description provided.

@DanielCChen DanielCChen requested review from kkwli and klausler July 18, 2025 15:11
@@ -85,7 +85,7 @@ RT_API_ATTRS void Descriptor::Establish(int characterKind,
RT_API_ATTRS void Descriptor::Establish(const typeInfo::DerivedType &dt,
void *p, int rank, const SubscriptValue *extent,
ISO::CFI_attribute_t attribute) {
std::size_t elementBytes{dt.sizeInBytes()};
std::size_t elementBytes{static_cast<std::size_t>(dt.sizeInBytes())};
Copy link
Contributor

Choose a reason for hiding this comment

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

As a stylistic point, I usually use auto for declarations initialized with casts, since the type is obvious and doesn't need to appear twice.

Copy link
Collaborator

@kkwli kkwli left a comment

Choose a reason for hiding this comment

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

LG

@DanielCChen DanielCChen merged commit 4bf4e87 into llvm:main Jul 18, 2025
9 checks passed
@DanielCChen DanielCChen deleted the daniel_32bit_flang_rt branch July 18, 2025 18:14
mdfazlay pushed a commit to mdfazlay/llvm-project that referenced this pull request Jul 18, 2025
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.

3 participants