Skip to content

Commit 6ac7748

Browse files
Address GitHub issues 3/15/22
1 parent b73d6c6 commit 6ac7748

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

docs/ide/walkthrough-testing-a-project-cpp.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about: Walkthrough: Testing a Project (C++)"
33
title: "Walkthrough: Testing a Project (C++)"
4-
ms.date: "04/25/2019"
4+
ms.date: 03/15/2022
55
helpviewer_keywords: ["project testing [C++]", "testing projects", "projects [C++], testing"]
66
ms.assetid: 88cdd377-c5c8-4201-889d-32f5653ebead
77
---
@@ -31,7 +31,7 @@ In this walkthrough, you watch the value of a variable as the program runs and d
3131

3232
1. On the menu bar, choose **Debug** > **Start Debugging**, or choose the **F5** key.
3333

34-
When the program reaches the line that has the breakpoint, execution stops temporarily, because your program is in Break mode. A yellow arrow to the left of a line of code indicates that it's the next line to be executed.
34+
Because your program is in Break mode, execution pauses when it reaches the breakpoint line. A yellow arrow to the left of a line of code indicates that it's the next line to be executed.
3535

3636
1. To examine the value of the `Cardgame::totalParticipants` variable, move the pointer over `Cardgame` and then move it over the expansion control at the left of the tooltip window. The variable name `totalParticipants` and its value of **12** are displayed.
3737

@@ -43,16 +43,16 @@ In this walkthrough, you watch the value of a variable as the program runs and d
4343

4444
1. Open the shortcut menu for the `return 0;` statement and then choose **Run to Cursor**. The yellow arrow to the left of the code points to the next statement to be executed.
4545

46-
1. The `Cardgame::totalParticipants` number should decrease when a `Cardgame` ends. At this point, `Cardgame::totalParticipants` should equal 0 because all `Cardgame` instances have been deleted, but the **Watch 1** window indicates that `Cardgame::totalparticipants` equals **18**. The difference indicates that there's a bug in the code, which you can detect and fix by completing the next walkthrough, [Walkthrough: Debugging a Project (C++)](../ide/walkthrough-debugging-a-project-cpp.md).
46+
1. The `Cardgame::totalParticipants` number should decrease when a `Cardgame` ends. At this point, `Cardgame::totalParticipants` should equal 0 because all `Cardgame` instances have been deleted, but the **Watch 1** window indicates that `Cardgame::totalparticipants` equals **18**. The difference indicates that there's a bug in the code. You can detect and fix it by completing the next walkthrough, [Walkthrough: Debugging a Project (C++)](../ide/walkthrough-debugging-a-project-cpp.md).
4747

4848
1. To stop the program, on the menu bar, choose **Debug** > **Stop Debugging**, or choose the **Shift**+**F5** keyboard shortcut.
4949

5050
## Next Steps
5151

52-
**Previous:** [Walkthrough: Building a Project (C++)](../ide/walkthrough-building-a-project-cpp.md)<br/>
52+
**Previous:** [Walkthrough: Building a Project (C++)](../ide/walkthrough-building-a-project-cpp.md)\
5353
**Next:** [Walkthrough: Debugging a Project (C++)](../ide/walkthrough-debugging-a-project-cpp.md)
5454

5555
## See also
5656

57-
[C++ Language Reference](../cpp/cpp-language-reference.md)<br/>
58-
[Projects and build systems](../build/projects-and-build-systems-cpp.md)<br/>
57+
[C++ Language Reference](../cpp/cpp-language-reference.md)\
58+
[Projects and build systems](../build/projects-and-build-systems-cpp.md)

docs/preprocessor/fp-contract.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about the fp_contract pragma directive in Microsoft C/C++"
33
title: "fp_contract pragma"
4-
ms.date: 08/10/2021
4+
ms.date: 03/15/2022
55
f1_keywords: ["vc-pragma.fp_contract", "fp_contract_CPP"]
66
helpviewer_keywords: ["pragma, fp_contract", "fp_contract pragma"]
77
no-loc: ["pragma"]
@@ -18,17 +18,15 @@ Determines whether floating-point contraction takes place. A floating-point cont
1818

1919
::: moniker range=">msvc-160"
2020

21-
By default, **`fp_contract`** is **`off`**, which tells the compiler to preserve individual floating-point instructions. Set **`fp_contract`** to **`on`** to use floating-point contraction instructions where possible. This behavior is new in Visual Studio 2022. In previous compiler versions **`fp_contract`** defaulted to **`on`**.
21+
By default, **`fp_contract`** is **`off`**, which tells the compiler to preserve individual floating-point instructions. Set **`fp_contract`** to **`on`** to use floating-point contraction instructions where possible. This behavior is new in Visual Studio 2022 version 17.0. In previous compiler versions, **`fp_contract`** defaulted to **`on`**.
2222

2323
::: moniker-end
2424
::: moniker range="<=msvc-160"
2525

26-
By default, **`fp_contract`** is **`on`**. This tells the compiler to use floating-point contraction instructions where possible. Set **`fp_contract`** to **`off`** to preserve individual floating-point instructions.
26+
By default, **`fp_contract`** is **`on`**. This setting tells the compiler to use floating-point contraction instructions where possible. Set **`fp_contract`** to **`off`** to preserve individual floating-point instructions. In Visual Studio 2022 version 17.0 and later, **`fp_contract`** defaults to **`off`**.
2727

2828
::: moniker-end
2929

30-
By default, **`fp_contract`** is **`off`**. This tells the compiler to preserve individual floating-point instructions. Set **`fp_contract`** to **`on`** to use floating-point contraction instructions where possible.
31-
3230
For more information on floating-point behavior, see [`/fp` (Specify floating-point behavior)](../build/reference/fp-specify-floating-point-behavior.md).
3331

3432
Other floating-point pragma directives include:
@@ -39,12 +37,11 @@ Other floating-point pragma directives include:
3937

4038
## Example
4139

42-
The code generated from this sample does not use a fused-multiply-add instruction even when it is available on the target processor. If you comment out `#pragma fp_contract (off)`, the generated code may use a fused-multiply-add instruction if it is available.
40+
The **`/fp:fast`** compiler option enables contractions by default, but the `#pragma fp_contract (off)` directive in this example turns them off. The code generated from this sample won't use a fused-multiply-add instruction even when it's available on the target processor. If you comment out `#pragma fp_contract (off)`, the generated code may use a fused-multiply-add instruction if it's available.
4341

4442
```cpp
4543
// pragma_directive_fp_contract.cpp
4644
// on x86 and x64 compile with: /O2 /fp:fast /arch:AVX2
47-
// other platforms compile with: /O2
4845

4946
#include <stdio.h>
5047

docs/preprocessor/pragma-directives-and-the-pragma-keyword.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Pragma directives and the __pragma and _Pragma keywords"
33
description: "Describes the pragma directives available in Microsoft Visual C and C++ (MSVC)"
4-
ms.date: "01/19/2021"
4+
ms.date: 03/15/2022
55
f1_keywords: ["#pragma", "_Pragma", "__pragma"]
66
helpviewer_keywords: ["#pragma directives, C/C++", "__pragma keyword", "_Pragma keyword", "pragma directives, C/C++", "pragmas, C/C++", "preprocessor", "pragmas", "preprocessor, pragmas", "pragma directives (#pragma)"]
77
no-loc: ["pragma"]
@@ -142,7 +142,7 @@ Quotation marks and back-slashes should be escaped, as shown above. A pragma str
142142
143143
The following code example demonstrates how the **`_Pragma`** keyword could be used in an assert-like macro. It creates a pragma directive that suppresses a warning when the condition expression happens to be constant.
144144
145-
The macro definition uses the `do`-`while(0)` idiom for multi-statement macros so that it can be used as though it were one statement. For more information, see [C multi-line macro](https://stackoverflow.com/questions/1067226/c-multi-line-macro-do-while0-vs-scope-block) on Stack Overflow. The **`_Pragma`** statement only applies to the line of code that follows it.
145+
The macro definition uses the `do`-`while(0)` idiom for multi-statement macros so that it can be used as though it were one statement. For more information, see [C multi-line macro](https://stackoverflow.com/questions/1067226/c-multi-line-macro-do-while0-vs-scope-block) on Stack Overflow. The **`_Pragma`** statement in the example only applies to the line of code that follows it.
146146
147147
```C
148148
// Compile with /W4

0 commit comments

Comments
 (0)