Meg's Mirrors
zig
about
heads
tags
log
tree
search
Search
zig
test
cases
compile_errors
bad_alignCast_at_comptime.zig
pretty
plain
permalink
blame
history
•
9 lines
•
207 B
1
comptime {
2
const ptr: *align(1) i32 = @ptrFromInt(0x1);
3
const aligned: *align(4) i32 = @alignCast(ptr);
4
_ = aligned;
5
}
6
7
// error
8
//
9
// :3:47: error: pointer address 0x1 is not aligned to 4 bytes