Skip to content

Commit cd8bf7b

Browse files
committed
Put an anchor for reprc-unions
1 parent b469f97 commit cd8bf7b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/type-layout.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ An aggregate type (`struct` or `union`) with the `C` representation is laid out
324324
r[layout.repr.c.align]
325325
An aggregate type with the `C` representation has an alignment equal to the maximum alignment of each of its fields, unless an [alignment modifier][layout.repr.alignment] is present.
326326

327+
<a id="reprc-unions"></a>
327328
> [!NOTE]
328329
> The layout of unions in particular is maximally compact - the size of a `C` representation `union` is the size of its largest field, rounded up to the alignment of the `union`
329330

0 commit comments

Comments
 (0)