Skip to content

Fix UINT64_C/INT64_C macros under wasm64#26688

Merged
sbc100 merged 1 commit intoemscripten-core:mainfrom
sbc100:fix_INT64_C
Apr 15, 2026
Merged

Fix UINT64_C/INT64_C macros under wasm64#26688
sbc100 merged 1 commit intoemscripten-core:mainfrom
sbc100:fix_INT64_C

Conversation

@sbc100
Copy link
Copy Markdown
Collaborator

@sbc100 sbc100 commented Apr 15, 2026

Musl was assuming that 64-bit targets using long for int64_t but WebAssembly is a little different to other plaforms in that we use long long for int64_t for both 32-bit and 64-bit targets. See http://reviews.llvm.org/D12861.

Fixes: llvm/llvm-project#192236

@sbc100 sbc100 requested a review from juj April 15, 2026 16:23
@sbc100 sbc100 requested a review from kripken April 15, 2026 16:25
@sbc100 sbc100 merged commit 7c8bdb1 into emscripten-core:main Apr 15, 2026
27 checks passed
@sbc100 sbc100 deleted the fix_INT64_C branch April 15, 2026 18:17
sbc100 added a commit that referenced this pull request Apr 16, 2026
We were using these in inconsistently, which led to some
inconsistencies.

Followup to #26688.
@juj
Copy link
Copy Markdown
Collaborator

juj commented Apr 17, 2026

Nice analysis, thanks for the fix!

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.

Emscripten/WebAssembly: std::min() call fails in MEMORY64 mode, but passes in 32-bit mode

3 participants