Meg's Mirrors
zig
about
heads
tags
log
tree
search
Search
zig
doc
langref
test_comptime_incorrect_pointer_alignment.zig
pretty
plain
permalink
blame
history
•
7 lines
•
192 B
1
comptime {
2
const ptr: *align(1) i32 = @ptrFromInt(0x1);
3
const aligned: *align(4) i32 = @alignCast(ptr);
4
_ = aligned;
5
}
6
7
// test_error=pointer address 0x1 is not aligned to 4 bytes