-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorcontributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
Milestone
Description
Zig Version
0.15.0-dev.822+dd75e7bcb
Steps to Reproduce and Observed Behavior
Test case:
test "RapidHash" {
const bytes: []const u8 = "abcdefgh" ** 128;
const hash = std.hash.RapidHash.hash(0, bytes);
std.debug.print("sizeof usize is {}, hash is {x}\n", .{ @sizeOf(usize), hash });
}
Build on 32-bit target:
zig build -Dtarget=riscv32-linux test
Compilation error:
std/hash/RapidHash.zig:26:25: error: expected type 'usize', found 'u64'
b = ((r32(k[d..]) << 32) | r32(k[(e - d)..]));
^
std/hash/RapidHash.zig:26:25: note: unsigned 32-bit int cannot represent all possible unsigned 64-bit values
Expected Behavior
The test case should compile and run
RetroDev256, unLomTrois and VoilaNeighbor
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorcontributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.