Most of this migration was performed automatically with `zig fmt`. There were a few exceptions which I had to manually fix: * `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten * `@truncate`'s fixup is incorrect for vectors * Test cases are not formatted, and their error locations change
12 lines
242 B
Zig
12 lines
242 B
Zig
comptime {
|
|
const ptr: *align(1) i32 = @ptrFromInt(0x1);
|
|
const aligned: *align(4) i32 = @alignCast(ptr);
|
|
_ = aligned;
|
|
}
|
|
|
|
// error
|
|
// backend=stage2
|
|
// target=native
|
|
//
|
|
// :3:47: error: pointer address 0x1 is not aligned to 4 bytes
|