Skip to content

fix: Windows cross-compilation — unsigned long vs size_t in polynomial_arithmetic.hpp#22072

Merged
ludamad merged 1 commit into
v4-nextfrom
claudebox/fe9af88896e7e6d6-8
Mar 26, 2026
Merged

fix: Windows cross-compilation — unsigned long vs size_t in polynomial_arithmetic.hpp#22072
ludamad merged 1 commit into
v4-nextfrom
claudebox/fe9af88896e7e6d6-8

Conversation

@AztecBot

Copy link
Copy Markdown
Collaborator

Summary

Fixes the second Windows cross-compilation failure on v4-next (after PR #22056 fixed the first one in file_io.hpp).

The header polynomial_arithmetic.hpp declares unsigned long num_coeffs but the implementation (.cpp) uses const size_t num_coeffs. On Linux these are the same type, but on Windows LLP64 unsigned long is 32-bit while size_t is 64-bit, causing -Wshorten-64-to-32 when passing domain.size (size_t).

This function was removed on next before Windows cross-compilation was added, so it was never caught there. It's v4-specific legacy code.

CI failure: https://github.com/AztecProtocol/aztec-packages/actions/runs/23608075427/job/68756199559

ClaudeBox log: https://claudebox.work/s/fe9af88896e7e6d6?run=8

… header

The implementation (.cpp) already uses size_t but the header declared
unsigned long. On Linux these are the same type, but on Windows LLP64
unsigned long is 32-bit while size_t is 64-bit, causing -Wshorten-64-to-32
when passing domain.size (size_t) to the parameter.
@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels Mar 26, 2026
@ludamad ludamad marked this pull request as ready for review March 26, 2026 17:51
@ludamad ludamad changed the base branch from backport-to-v4-next-staging to v4-next March 26, 2026 17:51
@ludamad ludamad added ci-release-pr Creates a development tag and runs the release suite and removed ci-draft Run CI on draft PRs. labels Mar 26, 2026
@ludamad ludamad enabled auto-merge March 26, 2026 17:52
@AztecBot AztecBot removed the ci-release-pr Creates a development tag and runs the release suite label Mar 26, 2026
@ludamad ludamad merged commit c31254f into v4-next Mar 26, 2026
30 of 38 checks passed
@ludamad ludamad deleted the claudebox/fe9af88896e7e6d6-8 branch March 26, 2026 17:53
nventuro added a commit that referenced this pull request Mar 26, 2026
…l_arithmetic.hpp (#22073)

## Summary

Fixes Windows cross-compilation failure on v4-next. Replaces previous PR
#22072 which merged without CI validation.

The header `polynomial_arithmetic.hpp` declares `unsigned long
num_coeffs` but the implementation (.cpp) uses `const size_t
num_coeffs`. On Linux these are the same type, but on Windows LLP64
`unsigned long` is 32-bit while `size_t` is 64-bit, causing
`-Wshorten-64-to-32` when passing `domain.size` (size_t).

This function was removed on `next` before Windows cross-compilation was
added, so it was never caught there. It's v4-specific legacy code.

Also includes clang-format fix (the previous PR had format violations).

CI failure:
https://github.com/AztecProtocol/aztec-packages/actions/runs/23608075427/job/68756199559

ClaudeBox log: https://claudebox.work/s/fe9af88896e7e6d6?run=11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants