Skip to content

Commit a7d040c

Browse files
ldm0Havvy
authored andcommitted
Size fo empty structs in C is zero byte.
1 parent 0719a1f commit a7d040c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/type-layout.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,9 @@ the sake of clarity. To perform memory layout computations in actual code, use
236236

237237
</div>
238238

239-
> Note: This algorithm can produce zero-sized structs. This differs from
240-
> C where structs without data still have a size of one byte.
239+
> Note: This algorithm can produce zero-sized structs. In C, the size of
240+
> structs without data is zero. This is not the same as C++ where structs
241+
> without data still have a size of one byte.
241242
242243
#### \#[repr(C)] Unions
243244

0 commit comments

Comments
 (0)