Skip to content

Commit 4b8e177

Browse files
authored
Merge pull request MicrosoftDocs#4994 from MicrosoftDocs/FromPublicMasterBranch
Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main)
2 parents 54710a9 + 4a97921 commit 4b8e177

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
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 must also be long enough to contain the bit pattern. 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! */
@@ -72,7 +72,7 @@ the bits of `test` would be arranged as follows:
7272
cccccccb bbbbaaaa
7373
```
7474
75-
Since the 8086 family of processors stores the low byte of integer values before the high byte, the integer `0x01F2` would be stored in physical memory as `0xF2` followed by `0x01`.
75+
Since the 8086 family of processors store the low byte of integer values before the high byte, the integer `0x01F2` would be stored in physical memory as `0xF2` followed by `0x01`.
7676
7777
The ISO C99 standard lets an implementation choose whether a bit field may straddle two storage instances. Consider this structure, which stores bit fields that total 64 bits:
7878

docs/c-language/storage-and-alignment-of-structures.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ where *n* is the packing size expressed with the /Zp[*n*] option and *item* is t
2727

2828
To use the `pack` pragma to specify packing other than the packing specified on the command line for a particular structure, give the `pack` pragma, where the packing size is 1, 2, 4, 8, or 16, before the structure. To reinstate the packing given on the command line, specify the `pack` pragma with no arguments.
2929

30-
Bit fields default to size **`long`** for the Microsoft C compiler. Structure members are aligned on the size of the type or the /Zp[*n*] size, whichever is smaller. The default size is 4.
30+
For the Microsoft C compiler, bit fields default to a size of 4 bytes, which is a **`long`** data type. Structure members are aligned on the size of the type or the /Zp[*n*] size, whichever is smaller.
3131

3232
**END Microsoft Specific**
3333

docs/c-language/union-declarations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Nested unions can be declared anonymously when they're members of another struct
8181
struct str
8282
{
8383
int a, b;
84-
union / * Unnamed union */
84+
union /* Unnamed union */
8585
{
8686
char c[4];
8787
long l;

0 commit comments

Comments
 (0)