diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2022-10-15 03:31:17 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-10-15 14:19:40 -0400 |
| commit | f9192adaba0eb344ed12aad9c675cd73b740d2a2 (patch) | |
| tree | f06afc534fa97ca50c1e8d56189d5697d160b095 /doc/langref.html.in | |
| parent | c7f98332383d71a57699426027e82c435e91addc (diff) | |
| download | zig-f9192adaba0eb344ed12aad9c675cd73b740d2a2.tar.gz zig-f9192adaba0eb344ed12aad9c675cd73b740d2a2.zip | |
llvm: fix lowering of non-byte-aligned field pointers
* When a field starts at some bit offset within a byte you need to load
starting from that byte and shift, not starting from the next byte,
so a rounded-down divide is required here, not a rounded-up one.
* Remove paragraph from doc that no longer relates to anything.
Closes #12363
Diffstat (limited to 'doc/langref.html.in')
| -rw-r--r-- | doc/langref.html.in | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/doc/langref.html.in b/doc/langref.html.in index 872c305252..cb397eb446 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -3341,7 +3341,6 @@ fn doTheTest() !void { Zig allows the address to be taken of a non-byte-aligned field: </p> {#code_begin|test|pointer_to_non-byte_aligned_field#} - {#backend_stage1#} const std = @import("std"); const expect = std.testing.expect; @@ -3398,7 +3397,6 @@ fn bar(x: *const u3) u3 { Pointers to non-ABI-aligned fields share the same address as the other fields within their host integer: </p> {#code_begin|test|packed_struct_field_addrs#} - {#backend_stage1#} const std = @import("std"); const expect = std.testing.expect; @@ -3463,9 +3461,6 @@ test "overaligned pointer to packed struct" { try expect(ptr_to_b.* == 2); } {#code_end#} - <p>When this bug is fixed, the above test in the documentation will unexpectedly pass, which will - cause the test suite to fail, notifying the bug fixer to update these docs. - </p> <p> It's also possible to set alignment of struct fields: </p> |
