Open leap0x7b opened 11 months ago
I wasn't able to build the project. Could you provide a minimal reproduction of the issue?
test {
@compileLog(@bitSizeOf(usize));
@compileLog(@bitSizeOf(c_long));
}
❯ zig test test.zig -target riscv64-linux-gnu
test.zig:22:5: error: found compile log statement
Compile Log Output:
@as(comptime_int, 64)
@as(comptime_int, 64)
❯ zig test test.zig -target riscv64-uefi-msvc
Compile Log Output:
@as(comptime_int, 64)
@as(comptime_int, 32)
Here's a test case reproduction. I used a short to reproduce the issue on more platforms, but long also works for me on x86_64-linux:
int main() {
short s = 42;
short* s_ptr = &s;
s_ptr = (short*)s;
}
// run-translated-c
Zig Version
0.12.0-dev.3+9c05810be
Steps to Reproduce and Observed Behavior
git clone https://github.com/kora-org/headstart
zig build -Darch=riscv64
This error should pop up:
Expected Behavior
It should compiles fine like in x86_64 and aarch64.