Skip to content

Commit 1cfca66

Browse files
authored
docs: updated explanation
Updated the explanation to align with the code, taking Tyler's input into account. Thank you, Tyler!
1 parent f92be36 commit 1cfca66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/c-language/c-bit-fields.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The *`constant-expression`* specifies the width of the field in bits. The *`type
1919

2020
Unnamed bit fields can't be referenced, and their contents at run time are unpredictable. They can be used as "dummy" fields, for alignment purposes. An unnamed bit field whose width is specified as 0 guarantees that storage for the member following it in the *struct-declaration-list* begins on an **`int`** boundary.
2121

22-
Bit fields should not exceed the total number of bits of their underlying type. For example, these two statements aren't legal:
22+
The number of bits in a bit field must be less than or equal to the size of the underlying type. For example, these two statements aren't legal:
2323

2424
```C
2525
short a:17; /* Illegal! */

0 commit comments

Comments
 (0)