#zig build-obj {
--name test -fno-emit-bin
-Mroot=test.zig
#}

#write test.zig {
const p: ?*const u8 = null;
export fn a() void {
    _ = @as(*const u32, @ptrCast(@alignCast(p)));
}
export fn b() void {
    _ = @constCast(@volatileCast(123));
}
export fn c() void {
    const x: ?*f32 = @ptrCast(@addrSpaceCast(@constCast(@volatileCast(p))));
    _ = x;
}
#}
#update
#check errors {
test.zig:3:45: error: null pointer casted to type '*const u32'
test.zig:6:34: error: expected pointer type, found 'comptime_int'
test.zig:9:22: error: @ptrCast increases pointer alignment
test.zig:9:71: note: '?*const u8' has alignment '1'
test.zig:9:22: note: '?*f32' has alignment '4'
test.zig:9:22: note: use @alignCast to assert pointer alignment
#}
