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

// error
//
// :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