Skip to content

Commit 6fc256e

Browse files
authored
Merge branch 'MicrosoftDocs:main' into main
2 parents 3db99fa + b9dc430 commit 6fc256e

File tree

182 files changed

+1977
-1374
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+1977
-1374
lines changed

docs/assembler/inline/asm.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ ms.assetid: 77ff3bc9-a492-4b5e-85e1-fa4e414e79cd
1010

1111
**Microsoft Specific**
1212

13-
The **`__asm`** keyword invokes the inline assembler and can appear wherever a C or C++ statement is legal. It cannot appear by itself. It must be followed by an assembly instruction, a group of instructions enclosed in braces, or, at the very least, an empty pair of braces. The term "**`__asm`** block" here refers to any instruction or group of instructions, whether or not in braces.
13+
The **`__asm`** keyword invokes the inline assembler and can appear wherever a C or C++ statement is legal. It can't appear by itself. It must be followed by an assembly instruction, a group of instructions enclosed in braces, or, at minimum, an empty pair of braces. The term "**`__asm`** block" here refers to any instruction or group of instructions, whether or not in braces.
1414

1515
> [!NOTE]
1616
> Visual C++ support for the Standard C++ **`asm`** keyword is limited to the fact that the compiler will not generate an error on the keyword. However, an **`asm`** block will not generate any meaningful code. Use **`__asm`** instead of **`asm`**.
1717
1818
## Grammar
1919

20-
*asm-block*:<br/>
21-
&nbsp;&nbsp;&nbsp;&nbsp;**`__asm`** *assembly-instruction* **`;`**<sub>opt</sub><br/>
22-
&nbsp;&nbsp;&nbsp;&nbsp;**`__asm {`** *assembly-instruction-list* **`}`** **`;`**<sub>opt</sub>
20+
*asm-block*:\
21+
&emsp;**`__asm`** *assembly-instruction* **`;`**<sub>opt</sub>\
22+
&emsp;**`__asm {`** *assembly-instruction-list* **`}`** **`;`**<sub>opt</sub>
2323

24-
*assembly-instruction-list*:<br/>
25-
&nbsp;&nbsp;&nbsp;&nbsp;*assembly-instruction* **`;`**<sub>opt</sub><br/>
26-
&nbsp;&nbsp;&nbsp;&nbsp;*assembly-instruction* **`;`** *assembly-instruction-list* **`;`**<sub>opt</sub>
24+
*assembly-instruction-list*:\
25+
&emsp;*assembly-instruction* **`;`**<sub>opt</sub>\
26+
&emsp;*assembly-instruction* **`;`** *assembly-instruction-list* **`;`**<sub>opt</sub>
2727

2828
## Remarks
2929

@@ -37,7 +37,7 @@ Before Visual Studio 2005, the instruction
3737
__asm int 3
3838
```
3939

40-
did not cause native code to be generated when compiled with **/clr**; the compiler translated the instruction to a CLR break instruction.
40+
didn't cause native code to be generated when compiled with **/clr**; the compiler translated the instruction to a CLR break instruction.
4141

4242
`__asm int 3` now results in native code generation for the function. If you want a function to cause a break point in your code and if you want that function compiled to MSIL, use [__debugbreak](../../intrinsics/debugbreak.md).
4343

@@ -69,9 +69,9 @@ Because the **`__asm`** keyword is a statement separator, you can also put assem
6969
__asm mov al, 2 __asm mov dx, 0xD007 __asm out dx, al
7070
```
7171

72-
All three examples generate the same code, but the first style (enclosing the **`__asm`** block in braces) has some advantages. The braces clearly separate assembly code from C or C++ code and avoid needless repetition of the **`__asm`** keyword. Braces can also prevent ambiguities. If you want to put a C or C++ statement on the same line as an **`__asm`** block, you must enclose the block in braces. Without the braces, the compiler cannot tell where assembly code stops and C or C++ statements begin. Finally, because the text in braces has the same format as ordinary MASM text, you can easily cut and paste text from existing MASM source files.
72+
All three examples generate the same code, but the first style (enclosing the **`__asm`** block in braces) has some advantages. The braces clearly separate assembly code from C or C++ code and avoid needless repetition of the **`__asm`** keyword. Braces can also prevent ambiguities. If you want to put a C or C++ statement on the same line as an **`__asm`** block, you must enclose the block in braces. Without the braces, the compiler can't tell where assembly code stops and C or C++ statements begin. Finally, because the text in braces has the same format as ordinary MASM text, you can easily cut and paste text from existing MASM source files.
7373

74-
Unlike braces in C and C++, the braces enclosing an **`__asm`** block don't affect variable scope. You can also nest **`__asm`** blocks; nesting does not affect variable scope.
74+
Unlike braces in C and C++, the braces enclosing an **`__asm`** block don't affect variable scope. You can also nest **`__asm`** blocks; nesting doesn't affect variable scope.
7575

7676
**END Microsoft Specific**
7777

docs/build/arm64-exception-handling.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "ARM64 exception handling"
33
description: Describes the exception handling conventions and data used by windows on ARM64.
4-
ms.date: 10/10/2022
4+
ms.date: 01/13/2023
55
---
66
# ARM64 exception handling
77

@@ -218,11 +218,11 @@ This data is broken into four sections:
218218
219219
2. If **E** is 1, then this field specifies the index of the first unwind code that describes the one and only epilog.
220220
221-
f. **Code Words** is a 5-bit field that specifies the number of 32-bit words needed to contain all of the unwind codes in section 3. If more than 31 words are required (that is, if there are more than 124 unwind code bytes), then this field must be 0 to indicate that an extension word is required.
221+
f. **Code Words** is a 5-bit field that specifies the number of 32-bit words needed to contain all of the unwind codes in section 3. If more than 31 words (that is, 124 unwind codes) are required, then this field must be 0 to indicate that an extension word is required.
222222
223223
g. **Extended Epilog Count** and **Extended Code Words** are 16-bit and 8-bit fields, respectively. They provide more space for encoding an unusually large number of epilogs, or an unusually large number of unwind code words. The extension word that contains these fields is only present if both the **Epilog Count** and **Code Words** fields in the first header word are 0.
224224
225-
1. If **Epilog Count** isn't zero, a list of information about epilog scopes, packed one to a word, comes after the header and optional extended header. They're stored in order of increasing starting offset. Each scope contains the following bits:
225+
1. If the count of epilogs isn't zero, a list of information about epilog scopes, packed one to a word, comes after the header and optional extended header. They're stored in order of increasing starting offset. Each scope contains the following bits:
226226
227227
a. **Epilog Start Offset** is an 18-bit field that has the offset in bytes, divided by 4, of the epilog relative to the start of the function.
228228
@@ -281,15 +281,15 @@ If exceptions were guaranteed to only ever occur within a function body, and nev
281281

282282
- By counting the number of instructions before the end of the prolog, it's possible to skip the equivalent number of unwind codes. We can execute the rest of the sequence to undo only those parts of the prolog that have completed execution.
283283

284-
The unwind codes are encoded according to the table below. All unwind codes are a single/double byte, except the one that allocates a huge stack. There are 22 unwind codes in total. Each unwind code maps exactly one instruction in the prolog/epilog, to allow for unwinding of partially executed prologs and epilogs.
284+
The unwind codes are encoded according to the table below. All unwind codes are a single/double byte, except the one that allocates a huge stack (`alloc_l`). There are 22 unwind codes in total. Each unwind code maps exactly one instruction in the prolog/epilog, to allow for unwinding of partially executed prologs and epilogs.
285285

286286
| Unwind code | Bits and interpretation |
287287
|--|--|
288288
| `alloc_s` | 000xxxxx: allocate small stack with size \< 512 (2^5 * 16). |
289289
| `save_r19r20_x` | 001zzzzz: save `<x19,x20>` pair at `[sp-#Z*8]!`, pre-indexed offset >= -248 |
290290
| `save_fplr` | 01zzzzzz: save `<x29,lr>` pair at `[sp+#Z*8]`, offset \<= 504. |
291291
| `save_fplr_x` | 10zzzzzz: save `<x29,lr>` pair at `[sp-(#Z+1)*8]!`, pre-indexed offset >= -512 |
292-
| `alloc_m` | 11000xxx'xxxxxxxx: allocate large stack with size \< 16k (2^11 * 16). |
292+
| `alloc_m` | 11000xxx'xxxxxxxx: allocate large stack with size \< 32K (2^11 * 16). |
293293
| `save_regp` | 110010xx'xxzzzzzz: save `x(19+#X)` pair at `[sp+#Z*8]`, offset \<= 504 |
294294
| `save_regp_x` | 110011xx'xxzzzzzz: save pair `x(19+#X)` at `[sp-(#Z+1)*8]!`, pre-indexed offset >= -512 |
295295
| `save_reg` | 110100xx'xxzzzzzz: save reg `x(19+#X)` at `[sp+#Z*8]`, offset \<= 504 |

docs/build/clang-support-cmake.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ You can use Visual Studio with Clang to edit and debug C++ CMake projects that t
2424
::: moniker-end
2525
::: moniker range="msvc-160"
2626

27-
For the best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have those, you can install them by opening the Visual Studio Installer and choosing **C++ Clang compiler for Windows** under **Desktop development with C++** optional components. When using a custom Clang installation, check the **C++ Clang-cl for v142 build tools** component.
27+
For the best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have those, you can install them by opening the Visual Studio Installer and choosing **C++ Clang compiler for Windows** under **Desktop development with C++** optional components. You may prefer to use an existing Clang installation on your machine; if so, choose the **C++ Clang-cl for v142 build tools** or **C++ Clang-cl for v143 build tools** component.
2828

2929
![Screenshot of the Visual Studio Installer Individual Components page that shows Clang components available for installation.](media/clang-install-vs2019.png)
3030

3131
::: moniker-end
3232
::: moniker range="msvc-170"
3333

34-
For the best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have those, you can install them by opening the Visual Studio Installer and choosing **C++ Clang compiler for Windows** under **Desktop development with C++** optional components. When using a custom Clang installation, check the **MSBuild support for LLVM (clang-cl) toolset** component.
34+
For the best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have those, you can install them by opening the Visual Studio Installer and choosing **C++ Clang compiler for Windows** under **Desktop development with C++** optional components. You may prefer to use an existing Clang installation on your machine; if so, choose the **MSBuild support for LLVM (clang-cl) toolset** component.
3535

3636
![Screenshot of the Visual Studio Installer Individual Components page that shows Clang components available for installation.](media/clang-install-vs2022.png)
3737

docs/build/reference/permissive-standards-conformance.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "/permissive- (Standards conformance)"
33
description: "Reference guide to the Microsoft C++ /permissive- (Standards conformance) compiler option."
4-
ms.date: 06/29/2022
4+
ms.date: 12/14/2022
55
f1_keywords: ["/permissive", "VC.Project.VCCLCompilerTool.ConformanceMode"]
66
helpviewer_keywords: ["/permissive compiler options [C++]", "-permissive compiler options [C++]", "Standards conformance compiler options", "permissive compiler options [C++]"]
77
ms.assetid: db1cc175-6e93-4a2e-9396-c3725d2d8f71
@@ -52,27 +52,45 @@ void func(int default); // Error C2321: 'default' is a keyword, and
5252
5353
```cpp
5454
template <typename T>
55-
struct B {
56-
void f();
55+
struct B
56+
{
57+
void f() {}
58+
template <typename U>
59+
struct S { void operator()(){ return; } };
5760
};
5861
5962
template <typename T>
6063
struct D : public B<T> // B is a dependent base because its type
6164
// depends on the type of T.
6265
{
63-
// One possible fix is to uncomment the following line.
64-
// If this is a type, don't forget the 'typename' keyword.
66+
// One possible fix for non-template members and function
67+
// template members is a using statement:
6568
// using B<T>::f;
69+
// If it's a type, don't forget the 'typename' keyword.
6670
67-
void g() {
71+
void g()
72+
{
6873
f(); // error C3861: 'f': identifier not found
69-
// Another fix is to change it to 'this->f();'
74+
// Another fix is to change the call to 'this->f();'
75+
}
76+
77+
void h()
78+
{
79+
S<int> s; // C2065 or C3878
80+
// Since template S is dependent, the type must be qualified
81+
// with the `typename` keyword.
82+
// To fix, replace the declaration of s with:
83+
// typename B<T>::template S<int> s;
84+
// Or, use this:
85+
// typename D::template S<int> s;
86+
s();
7087
}
7188
};
7289
7390
void h() {
7491
D<int> d;
7592
d.g();
93+
d.h();
7694
}
7795
```
7896

docs/c-language/array-declarations.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,38 @@ An "array declaration" names the array and specifies the type of its elements. I
1111

1212
## Syntax
1313

14-
*declaration*:<br/>
15-
&nbsp;&nbsp;&nbsp;&nbsp;*declaration-specifiers* *init-declarator-list*<sub>opt</sub> **;**
14+
*`declaration`*:\
15+
&emsp;*`declaration-specifiers`* *`init-declarator-list`*<sub>opt</sub> **`;`**
1616

17-
*init-declarator-list*:<br/>
18-
&nbsp;&nbsp;&nbsp;&nbsp;*init-declarator*<br/>
19-
&nbsp;&nbsp;&nbsp;&nbsp;*init-declarator-list* **,** *init-declarator*
17+
*`init-declarator-list`*:\
18+
&emsp;*`init-declarator`*\
19+
&emsp;*`init-declarator-list`* **`,`** *`init-declarator`*
2020

21-
*init-declarator*:<br/>
22-
&nbsp;&nbsp;&nbsp;&nbsp;*declarator*<br/>
23-
&nbsp;&nbsp;&nbsp;&nbsp;*declarator* **=** *initializer*
21+
*`init-declarator`*:\
22+
&emsp;*`declarator`*\
23+
&emsp;*`declarator`* **`=`** *`initializer`*
2424

25-
*declarator*:<br/>
26-
&nbsp;&nbsp;&nbsp;&nbsp;*pointer*<sub>opt</sub> *direct-declarator*
25+
*`declarator`*:\
26+
&emsp;*`pointer`*<sub>opt</sub> *`direct-declarator`*
2727

28-
*direct-declarator*: /\* A function declarator \*/<br/>
29-
&nbsp;&nbsp;&nbsp;&nbsp;*direct-declarator* **[** *constant-expression*<sub>opt</sub> **]**
28+
*`direct-declarator`*: /\* A function declarator \*/\
29+
&emsp;*`direct-declarator`* **`[`** *`constant-expression`*<sub>opt</sub> **`]`**
3030

31-
Because *constant-expression* is optional, the syntax has two forms:
31+
Because *`constant-expression`* is optional, the syntax has two forms:
3232

33-
- The first form defines an array variable. The *constant-expression* argument within the brackets specifies the number of elements in the array. The *constant-expression*, if present, must have integral type, and a value larger than zero. Each element has the type given by *type-specifier*, which can be any type except **`void`**. An array element cannot be a function type.
33+
- The first form defines an array variable. The *`constant-expression`* argument within the brackets specifies the number of elements in the array. The *`constant-expression`*, if present, must have integral type, and a value larger than zero. Each element has the type given by *`type-specifier`*, which can be any type except **`void`**. An array element can't be a function type.
3434

35-
- The second form declares a variable that has been defined elsewhere. It omits the *constant-expression* argument in brackets, but not the brackets. You can use this form only if you previously have initialized the array, declared it as a parameter, or declared it as a reference to an array explicitly defined elsewhere in the program.
35+
- The second form declares a variable that has been defined elsewhere. It omits the *`constant-expression`* argument in brackets, but not the brackets. You can use this form only if you've previously initialized the array, declared it as a parameter, or declared it as a reference to an array that's explicitly defined elsewhere in the program.
3636

37-
In both forms, *direct-declarator* names the variable and can modify the variable's type. The brackets (**[ ]**) following *direct-declarator* modify the declarator to an array type.
37+
In both forms, *`direct-declarator`* names the variable and can modify the variable's type. The brackets (**`[ ]`**) following *`direct-declarator`* modify the declarator to an array type.
3838

3939
Type qualifiers can appear in the declaration of an object of array type, but the qualifiers apply to the elements rather than the array itself.
4040

4141
You can declare an array of arrays (a "multidimensional" array) by following the array declarator with a list of bracketed constant expressions in this form:
4242

43-
> *type-specifier* *declarator* **[** *constant-expression* **]** **[** *constant-expression* **]** ...
43+
> *`type-specifier`* *`declarator`* **`[`** *`constant-expression`* **`]`** **`[`** *`constant-expression`* **`]`** ...
4444
45-
Each *constant-expression* in brackets defines the number of elements in a given dimension: two-dimensional arrays have two bracketed expressions, three-dimensional arrays have three, and so on. You can omit the first constant expression if you have initialized the array, declared it as a parameter, or declared it as a reference to an array explicitly defined elsewhere in the program.
45+
Each *`constant-expression`* in brackets defines the number of elements in a given dimension: two-dimensional arrays have two bracketed expressions, three-dimensional arrays have three, and so on. You can omit the first constant expression if you've initialized the array, declared it as a parameter, or declared it as a reference to an array explicitly defined elsewhere in the program.
4646

4747
You can define arrays of pointers to various types of objects by using complex declarators, as described in [Interpreting More Complex Declarators](../c-language/interpreting-more-complex-declarators.md).
4848

@@ -52,7 +52,7 @@ Arrays are stored by row. For example, the following array consists of two rows
5252
char A[2][3];
5353
```
5454

55-
The three columns of the first row are stored first, followed by the three columns of the second row. This means that the last subscript varies most quickly.
55+
The three columns of the first row are stored first, followed by the three columns of the second row. It means that the last subscript varies most quickly.
5656

5757
To refer to an individual element of an array, use a subscript expression, as described in [Postfix Operators](../c-language/postfix-operators.md).
5858

@@ -72,7 +72,7 @@ struct {
7272
} complex[100];
7373
```
7474

75-
This is a declaration of an array of structures. This array has 100 elements; each element is a structure containing two members.
75+
This example is a declaration of an array of structures. This array has 100 elements; each element is a structure containing two members.
7676

7777
```C
7878
extern char *name[];
@@ -82,7 +82,7 @@ This statement declares the type and name of an array of pointers to **`char`**.
8282

8383
**Microsoft Specific**
8484

85-
The type of integer required to hold the maximum size of an array is the size of **size_t**. Defined in the header file STDDEF.H, **size_t** is an **`unsigned int`** with the range 0x00000000 to 0x7CFFFFFF.
85+
The type of integer required to hold the maximum size of an array is the size of **`size_t`**.
8686

8787
**END Microsoft Specific**
8888

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy