diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-09-10 02:08:11 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-09-20 18:33:01 -0700 |
| commit | d7d50496d91a8d2e2c1dafa4e92231672b266677 (patch) | |
| tree | 44edec291d44776d930dd3af81aea5e7caf09df9 /doc/langref/test_overaligned_packed_struct.zig | |
| parent | 725dec6aa7a7ec48625d16e5ea4e2c730f73d9dd (diff) | |
| download | zig-d7d50496d91a8d2e2c1dafa4e92231672b266677.tar.gz zig-d7d50496d91a8d2e2c1dafa4e92231672b266677.zip | |
langref: don't assume too much about pointer to packed struct field
Diffstat (limited to 'doc/langref/test_overaligned_packed_struct.zig')
| -rw-r--r-- | doc/langref/test_overaligned_packed_struct.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/langref/test_overaligned_packed_struct.zig b/doc/langref/test_overaligned_packed_struct.zig index b739b0d407..8bf52b3297 100644 --- a/doc/langref/test_overaligned_packed_struct.zig +++ b/doc/langref/test_overaligned_packed_struct.zig @@ -8,7 +8,7 @@ const S = packed struct { test "overaligned pointer to packed struct" { var foo: S align(4) = .{ .a = 1, .b = 2 }; const ptr: *align(4) S = &foo; - const ptr_to_b: *u32 = &ptr.b; + const ptr_to_b = &ptr.b; try expect(ptr_to_b.* == 2); } |
