Skip to content

Commit 5714abc

Browse files
author
Jim Wilson
committed
Ignore zero-length bit-fields when flattening.
1 parent 3518547 commit 5714abc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

riscv-elf.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,10 @@ hierarchy flattened, including any array fields. That is, `struct { struct
187187
{ float f[1]; } g[2]; }` and `struct { float f; float g; }` are
188188
treated the same. Fields containing empty structs or unions are ignored while
189189
flattening, even in C++, unless they have nontrivial copy constructors or
190-
destructors. Attributes such as `aligned` or `packed` do not interfere with a
190+
destructors. Fields containing zero-length bit-fields are ignored while
191+
flattening. Attributes such as `aligned` or `packed` do not interfere with a
191192
struct's eligibility for being passed in registers according to the rules
192-
below. i.e. `struct { int i; double d; }` and `struct
193+
below, i.e. `struct { int i; double d; }` and `struct
193194
__attribute__((__packed__)) { int i; double d }` are treated the same, as are
194195
`struct { float f; float g; }` and `struct { float f; float g __attribute__
195196
((aligned (8))); }`.

0 commit comments

Comments
 (0)