aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/invalid_bit_pointer.zig
blob: e05aaad07a1d11678be93c8275916370af76fb54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
comptime {
    _ = *align(1:32:4) u8;
}
comptime {
    _ = *align(1:25:4) u8;
}

// error
// backend=stage2
// target=native
//
// :2:18: error: packed type 'u8' at bit offset 32 starts 0 bits after the end of a 4 byte host integer
// :5:18: error: packed type 'u8' at bit offset 25 ends 1 bits after the end of a 4 byte host integer