Skip to content

Commit cebbb09

Browse files
New rule layout.repr.c.struct.align-empty
1 parent 92ba1b7 commit cebbb09

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/type-layout.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ r[layout.repr.c.struct]
200200
r[layout.repr.c.struct.align]
201201
The alignment of the struct is the alignment of the most-aligned field in it.
202202

203+
r[layout.repr.c.struct.align-empty]
204+
Structs with no fields are guaranteed to have alignment of 1.
205+
203206
r[layout.repr.c.struct.size-field-offset]
204207
The size and offset of fields is determined by the following algorithm.
205208

0 commit comments

Comments
 (0)