aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/bad_alignCast_at_comptime.zig
blob: 9dc31cd0e3f839b04e11912789badce3f5ffea1a (plain)
1
2
3
4
5
6
7
8
9
comptime {
    const ptr: *align(1) i32 = @ptrFromInt(0x1);
    const aligned: *align(4) i32 = @alignCast(ptr);
    _ = aligned;
}

// error
//
// :3:47: error: pointer address 0x1 is not aligned to 4 bytes