Skip to content

Commit 7c184f5

Browse files
authored
Merge pull request #4807 from MicrosoftDocs/FromPublicMasterBranch
Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main)
2 parents 7e01fdb + 817ba8c commit 7c184f5

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

docs/c-language/name-spaces.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ The compiler sets up "name spaces" to distinguish between the identifiers used f
1414
1515
This list describes the name spaces used in C.
1616

17-
Statement labels
17+
**Statement labels**\
1818
Named statement labels are part of statements. Definitions of statement labels are always followed by a colon but are not part of **`case`** labels. Uses of statement labels always immediately follow the keyword **`goto`**. Statement labels do not have to be distinct from other names or from label names in other functions.
1919

20-
Structure, union, and enumeration tags
20+
**Structure, union, and enumeration tags**\
2121
These tags are part of structure, union, and enumeration type specifiers and, if present, always immediately follow the reserved words **`struct`**, **`union`**, or **`enum`**. The tag names must be distinct from all other structure, enumeration, or union tags with the same visibility.
2222

23-
Members of structures or unions
23+
**Members of structures or unions**\
2424
Member names are allocated in name spaces associated with each structure and union type. That is, the same identifier can be a component name in any number of structures or unions at the same time. Definitions of component names always occur within structure or union type specifiers. Uses of component names always immediately follow the member-selection operators (**->** and **.**). The name of a member must be unique within the structure or union, but it does not have to be distinct from other names in the program, including the names of members of different structures and unions, or the name of the structure itself.
2525

26-
Ordinary identifiers
26+
**Ordinary identifiers**\
2727
All other names fall into a name space that includes variables, functions (including formal parameters and local variables), and enumeration constants. Identifier names have nested visibility, so you can redefine them within blocks.
2828

29-
Typedef names
29+
**Typedef names**\
3030
Typedef names cannot be used as identifiers in the same scope.
3131

3232
For example, since structure tags, structure members, and variable names are in three different name spaces, the three items named `student` in this example do not conflict. The context of each item allows correct interpretation of each occurrence of `student` in the program. (For information about structures, see [Structure Declarations](../c-language/structure-declarations.md).)

docs/c-language/scope-and-visibility.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ An identifier's "visibility" determines the portions of the program in which it
1111

1212
All identifiers except labels have their scope determined by the level at which the declaration occurs. The following rules for each kind of scope govern the visibility of identifiers within a program:
1313

14-
File scope
14+
**File scope**\
1515
The declarator or type specifier for an identifier with file scope appears outside any block or list of parameters and is accessible from any place in the translation unit after its declaration. Identifier names with file scope are often called "global" or "external." The scope of a global identifier begins at the point of its definition or declaration and terminates at the end of the translation unit.
1616

17-
Function scope
17+
**Function scope**\
1818
A label is the only kind of identifier that has function scope. A label is declared implicitly by its use in a statement. Label names must be unique within a function. (For more information about labels and label names, see [The goto and Labeled Statements](../c-language/goto-and-labeled-statements-c.md).)
1919

20-
Block scope
20+
**Block scope**\
2121
The declarator or type specifier for an identifier with block scope appears inside a block or within the list of formal parameter declarations in a function definition. It is visible only from the point of its declaration or definition to the end of the block containing its declaration or definition. Its scope is limited to that block and to any blocks nested in that block and ends at the curly brace that closes the associated block. Such identifiers are sometimes called "local variables."
2222

23-
Function-prototype scope
23+
**Function-prototype scope**\
2424
The declarator or type specifier for an identifier with function-prototype scope appears within the list of parameter declarations in a function prototype (not part of the function declaration). Its scope terminates at the end of the function declarator.
2525

2626
The appropriate declarations for making variables visible in other source files are described in [Storage Classes](../c-language/c-storage-classes.md). However, variables and functions declared at the external level with the **`static`** storage-class specifier are visible only within the source file in which they are defined. All other functions are globally visible.

docs/overview/visual-cpp-language-conformance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ For details on conformance improvements, see [C++ conformance improvements in Vi
216216
|  [`P2468R2 The Equality Operator You Are Looking For`](https://wg21.link/p2468r2) | no |
217217
|  [`P2493R0 Missing feature test macros for C++20 core papers`](https://wg21.link/p2493r0) | no |
218218
|  [`P2493R0 Missing feature test macros for C++20 core papers`](https://wg21.link/p2493r0) | no |
219-
| &emsp;[`P2513R3 char8_t Compatibility and Portability Fix`](https://wg21.link/p2513r3) | VS 2022 17.4 <sup>[DR](#note_DR)</sup> |
219+
| &emsp;[`P2513R4 char8_t Compatibility and Portability Fix`](https://wg21.link/p2513r4) | VS 2022 17.4 <sup>[DR](#note_DR)</sup> |
220220
| &emsp;[`P2579R0 Mitigation strategies for P2036 ”Changing scope for lambda trailing-return-type”`](https://wg21.link/p2579r0) | no |
221221
| &emsp;[`P2582R1 Wording for class template argument deduction from inherited constructors`](https://wg21.link/p2582r1) | no |
222222

0 commit comments

Comments
 (0)