diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-09-21 01:49:28 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-21 01:49:28 -0700 |
| commit | 010d9a63f20d8a4bd14cff0ada690b2d127a0371 (patch) | |
| tree | 12b56ddfe5a5b235ef0676832902a0b04ad7d57a /test/cases/compile_errors/implicitly_increasing_pointer_alignment.zig | |
| parent | 3fbb88c4bd146ca7bd9e7ab5da9c4b05298f3b34 (diff) | |
| parent | 633162eb0c8d302ba7585cd308e01237409f042e (diff) | |
| download | zig-010d9a63f20d8a4bd14cff0ada690b2d127a0371.tar.gz zig-010d9a63f20d8a4bd14cff0ada690b2d127a0371.zip | |
Merge pull request #25154 from ziglang/no-decl-val-3
rework byval ZIR instructions; forbid runtime vector indexes
Diffstat (limited to 'test/cases/compile_errors/implicitly_increasing_pointer_alignment.zig')
| -rw-r--r-- | test/cases/compile_errors/implicitly_increasing_pointer_alignment.zig | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/test/cases/compile_errors/implicitly_increasing_pointer_alignment.zig b/test/cases/compile_errors/implicitly_increasing_pointer_alignment.zig deleted file mode 100644 index 367b547d8e..0000000000 --- a/test/cases/compile_errors/implicitly_increasing_pointer_alignment.zig +++ /dev/null @@ -1,19 +0,0 @@ -const Foo = packed struct { - a: u8, - b: u32, -}; - -export fn entry() void { - var foo = Foo{ .a = 1, .b = 10 }; - bar(&foo.b); -} - -fn bar(x: *u32) void { - x.* += 1; -} - -// error -// -// :8:9: error: expected type '*u32', found '*align(1) u32' -// :8:9: note: pointer alignment '1' cannot cast into pointer alignment '4' -// :11:11: note: parameter type declared here |
