Skip to content

Commit 091a595

Browse files
committed
Size fo empty structs in C is zero byte.
1 parent e2f11fe commit 091a595

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/type-layout.md

+3-2
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)