Skip to content

Commit 3bbb799

Browse files
committed
Merging changes synced from https://github.com/MicrosoftDocs/cpp-docs-pr (branch live)
2 parents 951fbdc + 964bad7 commit 3bbb799

38 files changed

+488
-200
lines changed

docs/assembler/masm/operator-bitwise-and.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
description: "Learn more about: operator &"
3-
title: "operator &"
2+
description: "Learn more about: operator &"
3+
title: "operator &"
44
ms.date: "12/17/2019"
55
f1_keywords: ["&", "operator &"]
66
helpviewer_keywords: ["& operator, syntax", "AND operator", "& operator"]
77
ms.assetid: f3c51a54-48ba-4b99-afed-5c45177bf694
88
---
9-
# operator &
9+
# operator `&`
1010

1111
Bitwise **AND**. Used only within [.IF](dot-if.md), [.WHILE](dot-while.md), or [.REPEAT](dot-repeat.md) blocks and evaluated at run time, not at assembly time.
1212

docs/assembler/masm/operator-logical-and-masm-run-time.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
description: "Learn more about: operator && (MASM Run Time)"
3-
title: "operator && (MASM Run Time)"
2+
description: "Learn more about: operator && (MASM Run Time)"
3+
title: "operator && (MASM Run Time)"
44
ms.date: "12/17/2019"
55
f1_keywords: ["operator &&"]
66
helpviewer_keywords: ["operator &&", "&& operator"]
77
ms.assetid: 0a633a40-114c-48f5-88ff-09bc8d9b281a
88
---
9-
# operator && (MASM Run Time)
9+
# operator `&&` (MASM Run Time)
1010

1111
Logical **AND**. Used only within [.IF](dot-if.md), [.WHILE](dot-while.md), or [.REPEAT](dot-repeat.md) blocks and evaluated at run time, not at assembly time.
1212

docs/atl/reference/cadapt-class.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ T m_T;
9292

9393
This **`public`** data member can be accessed directly or indirectly with [operator const T&](#operator_const_t_amp) and [operator T&](#operator_t_amp).
9494

95-
## <a name="operator_const_t_amp"></a> CAdapt::operator const T&amp;
95+
## <a name="operator_const_t_amp"></a> CAdapt::operator const T&
9696

9797
Returns a **`const`** reference to the [m_T](#m_t) member, allowing the adapter object to be treated as if it were an object of type *T*.
9898

@@ -104,7 +104,7 @@ operator const T&() const;
104104

105105
A **`const`** reference to `m_T`.
106106

107-
## <a name="operator_t_amp"></a> CAdapt::operator T&amp;
107+
## <a name="operator_t_amp"></a> CAdapt::operator T&
108108

109109
Returns a reference to the [m_T](#m_t) member, allowing the adapter object to be treated as if it were an object of type *T*.
110110

docs/atl/reference/ccomptrbase-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ bool operator!() const throw();
237237
238238
Returns true if the `CComHeapPtr` pointer is equal to NULL, false otherwise.
239239
240-
## <a name="operator_amp"></a> CComPtrBase::operator &amp;
240+
## <a name="operator_amp"></a> CComPtrBase::operator &
241241
242242
The & operator.
243243

docs/atl/reference/cheapptrbase-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ T* m_pData;
160160

161161
This member variable holds the pointer information.
162162

163-
## <a name="operator_amp"></a> CHeapPtrBase::operator &amp;
163+
## <a name="operator_amp"></a> CHeapPtrBase::operator &
164164

165165
The & operator.
166166

docs/atl/reference/cpatht-class.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ The string to append.
598598
599599
Returns the updated path.
600600
601-
## <a name="operator_const_stringtype_amp"></a> CPathT::operator const StringType &amp;
601+
## <a name="operator_const_stringtype_amp"></a> CPathT::operator const StringType &
602602
603603
This operator allows the object to be treated like a string.
604604
@@ -622,7 +622,7 @@ operator PCXSTR() const throw();
622622
623623
Returns a string representing the current path managed by this object.
624624
625-
## <a name="operator_stringtype_amp"></a> CPathT::operator StringType &amp;
625+
## <a name="operator_stringtype_amp"></a> CPathT::operator StringType &
626626
627627
This operator allows the object to be treated like a string.
628628

docs/build/reference/compiler-options-listed-alphabetically.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ This table contains an alphabetical list of compiler options. For a list of comp
5050
| [`/Fo`](fo-object-file-name.md) | Creates an object file. |
5151
| [`/fp`](fp-specify-floating-point-behavior.md) | Specify floating-point behavior. |
5252
| [`/Fp`](fp-name-dot-pch-file.md) | Specifies a precompiled header file name. |
53+
| [`/fpcvt`](fpcvt.md) | Specify floating-point to unsigned integer conversion behavior. |
5354
| [`/FR`](fr-fr-create-dot-sbr-file.md)<br /><br /> [`/Fr`](fr-fr-create-dot-sbr-file.md) | Generates browser files. **`/Fr`** is deprecated. |
5455
| [`/FS`](fs-force-synchronous-pdb-writes.md) | Forces serialization of all writes to the program database (PDB) file through MSPDBSRV.EXE. |
5556
| [`/fsanitize`](fsanitize.md) | Enables compilation of sanitizer instrumentation such as AddressSanitizer. |

docs/build/reference/compiler-options-listed-by-category.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ This article contains a categorical list of compiler options. For an alphabetica
3333
| [`/clr`](clr-common-language-runtime-compilation.md) | Produces an output file to run on the common language runtime. |
3434
| [`/EH`](eh-exception-handling-model.md) | Specifies the model of exception handling. |
3535
| [`/fp`](fp-specify-floating-point-behavior.md) | Specifies floating-point behavior. |
36+
| [`/fpcvt`](fpcvt.md) | Specify floating-point to unsigned integer conversion behavior. |
3637
| [`/GA`](ga-optimize-for-windows-application.md) | Optimizes for Windows applications. |
3738
| [`/Gd`](gd-gr-gv-gz-calling-convention.md) | Uses the **`__cdecl`** calling convention. (x86 only) |
3839
| [`/Ge`](ge-enable-stack-probes.md) | Deprecated. Activates stack probes. |

docs/build/reference/fp-specify-floating-point-behavior.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ f1_keywords: ["VC.Project.VCCLCompilerTool.floatingPointModel", "VC.Project.VCCL
66
helpviewer_keywords: ["-fp compiler option [C++]", "/fp compiler option [C++]"]
77
ms.assetid: 10469d6b-e68b-4268-8075-d073f4f5d57e
88
---
9-
# /fp (Specify floating-point behavior)
9+
# `/fp` (Specify floating-point behavior)
1010

11-
Specifies how the compiler treats floating-point expressions, optimizations, and exceptions. The **/fp** options specify whether the generated code allows floating-point environment changes to the rounding mode, exception masks, and subnormal behavior, and whether floating-point status checks return current, accurate results. It controls whether the compiler generates code that maintains source operation and expression ordering and conforms to the standard for NaN propagation, or if it instead generates more efficient code that may reorder or combine operations and use simplifying algebraic transformations that aren't allowed by the standard.
11+
Specifies how the compiler treats floating-point expressions, optimizations, and exceptions. The **`/fp`** options specify whether the generated code allows floating-point environment changes to the rounding mode, exception masks, and subnormal behavior, and whether floating-point status checks return current, accurate results. It controls whether the compiler generates code that maintains source operation and expression order, and conforms to the standard for NaN propagation. Or, if it instead generates more efficient code that may reorder or combine operations and use simplifying algebraic transformations that aren't allowed by the IEEE-754 standard.
1212

1313
## Syntax
1414

15-
::: moniker range=">msvc-160"
15+
::: moniker range=">=msvc-170"
1616

1717
**`/fp:contract`**\
1818
**`/fp:except`**\[**`-`**]\
@@ -21,6 +21,7 @@ Specifies how the compiler treats floating-point expressions, optimizations, and
2121
**`/fp:strict`**
2222

2323
::: moniker-end
24+
2425
::: moniker range="<=msvc-160"
2526

2627
**`/fp:except`**\[**`-`**]\
@@ -32,7 +33,7 @@ Specifies how the compiler treats floating-point expressions, optimizations, and
3233

3334
### Arguments
3435

35-
::: moniker range=">msvc-160"
36+
::: moniker range=">=msvc-170"
3637

3738
#### <a name="contract"></a> `/fp:contract`
3839

@@ -50,7 +51,7 @@ By default, the compiler uses **`/fp:precise`** behavior.
5051

5152
Under **`/fp:precise`**, the compiler preserves the source expression ordering and rounding properties of floating-point code when it generates and optimizes object code for the target machine. The compiler rounds to source code precision at four specific points during expression evaluation: at assignments, typecasts, when floating-point arguments get passed to a function call, and when a function call returns a floating-point value. Intermediate computations may be performed at machine precision. Typecasts can be used to explicitly round intermediate computations.
5253

53-
::: moniker range=">msvc-160"
54+
::: moniker range=">=msvc-170"
5455

5556
The compiler doesn't perform algebraic transformations on floating-point expressions, such as reassociation or distribution, unless it can guarantee the transformation produces a bitwise identical result. Expressions that involve special values (NaN, +infinity, -infinity, -0.0) are processed according to IEEE-754 specifications. For example, `x != x` evaluates to **`true`** if `x` is NaN. Floating-point contractions aren't generated by default under **`/fp:precise`**. This behavior is new in Visual Studio 2022. Previous compiler versions could generate contractions by default under **`/fp:precise`**.
5657

@@ -61,7 +62,7 @@ The compiler doesn't perform algebraic transformations on floating-point express
6162

6263
::: moniker-end
6364

64-
The compiler generates code intended to run in the [default floating-point environment](#the-default-floating-point-environment). It also assumes the floating-point environment isn't accessed or modified at runtime. That is, it assumes the code doesn't unmask floating-point exceptions, read or write floating-point status registers, or change rounding modes.
65+
The compiler generates code intended to run in the [default floating-point environment](#the-default-floating-point-environment). It also assumes the floating-point environment isn't accessed or modified at runtime. That is, it assumes the code: leaves floating-point exceptions masked, doesn't read or write floating-point status registers, and doesn't change rounding modes.
6566

6667
If your floating-point code doesn't depend on the order of operations and expressions in your floating-point statements (for example, if you don't care whether `a * b + a * c` is computed as `(b + c) * a` or `2 * a` as `a + a`), consider the [`/fp:fast`](#fast) option, which can produce faster, more efficient code. If your code both depends on the order of operations and expressions, and accesses or alters the floating-point environment (for example, to change rounding modes or to trap floating-point exceptions), use [`/fp:strict`](#strict).
6768

@@ -77,9 +78,9 @@ Under **`/fp:strict`**, the compiler generates code that allows the program to s
7778

7879
The **`/fp:fast`** option allows the compiler to reorder, combine, or simplify floating-point operations to optimize floating-point code for speed and space. The compiler may omit rounding at assignment statements, typecasts, or function calls. It may reorder operations or make algebraic transforms, for example, by use of associative and distributive laws. It may reorder code even if such transformations result in observably different rounding behavior. Because of this enhanced optimization, the result of some floating-point computations may differ from the ones produced by other **`/fp`** options. Special values (NaN, +infinity, -infinity, -0.0) may not be propagated or behave strictly according to the IEEE-754 standard. Floating-point contractions may be generated under **`/fp:fast`**. The compiler is still bound by the underlying architecture under **`/fp:fast`**, and more optimizations may be available through use of the [`/arch`](arch-minimum-cpu-architecture.md) option.
7980

80-
Under **`/fp:fast`**, the compiler generates code intended to run in the default floating-point environment and assumes the floating-point environment isn't accessed or modified at runtime. That is, it assumes the code doesn't unmask floating-point exceptions, read or write floating-point status registers, or change rounding modes.
81+
Under **`/fp:fast`**, the compiler generates code intended to run in the default floating-point environment and assumes the floating-point environment isn't accessed or modified at runtime. That is, it assumes the code: leaves floating-point exceptions masked, doesn't read or write floating-point status registers, and doesn't change rounding modes.
8182

82-
`/fp:fast` is intended for programs that don't require strict source code ordering and rounding of floating-point expressions, and don't rely on the standard rules for handling special values such as NaN. If your floating-point code requires preservation of source code ordering and rounding, or relies on standard behavior of special values, use [`/fp:precise`](#precise). If your code accesses or modifies the floating-point environment to change rounding modes, unmask floating-point exceptions, or check floating-point status, use [`/fp:strict`](#strict).
83+
**`/fp:fast`** is intended for programs that don't require strict source code ordering and rounding of floating-point expressions, and don't rely on the standard rules for handling special values such as `NaN`. If your floating-point code requires preservation of source code ordering and rounding, or relies on standard behavior of special values, use [`/fp:precise`](#precise). If your code accesses or modifies the floating-point environment to change rounding modes, unmask floating-point exceptions, or check floating-point status, use [`/fp:strict`](#strict).
8384

8485
#### <a name="except"></a> `/fp:except`
8586

@@ -97,24 +98,26 @@ The [`/Za`](za-ze-disable-language-extensions.md) (ANSI compatibility) option is
9798

9899
The compiler provides three pragma directives to override the floating-point behavior specified on the command line: [`float_control`](../../preprocessor/float-control.md), [`fenv_access`](../../preprocessor/fenv-access.md), and [`fp_contract`](../../preprocessor/fp-contract.md). You can use these directives to control floating-point behavior at function-level, not within a function. These directives don't correspond directly to the **`/fp`** options. This table shows how the **`/fp`** options and pragma directives map to each other. For more information, see the documentation for the individual options and pragma directives.
99100

100-
::: moniker range=">msvc-160"
101+
::: moniker range=">=msvc-170"
101102

102103
| Option | `float_control(precise, *)` | `float_control(except, *)` | `fenv_access(*)` | `fp_contract(*)` |
103104
|--|--|--|--|--|
104-
| `/fp:fast` | `off` | `off` | `off` | `on` |
105-
| `/fp:precise` | `on` | `off` | `off` | `off`\* |
106-
| `/fp:strict` | `on` | `on` | `on` | `off` |
105+
| **`/fp:fast`** | `off` | `off` | `off` | `on` |
106+
| **`/fp:precise`** | `on` | `off` | `off` | `off`\* |
107+
| **`/fp:strict`** | `on` | `on` | `on` | `off` |
107108

108109
\* In versions of Visual Studio before Visual Studio 2022, the **`/fp:precise`** behavior defaulted to `fp_contract(on)`.
109110

110111
::: moniker-end
111-
::: moniker range=">msvc-160"
112+
::: moniker range="<=msvc-160"
112113

113114
| Option | `float_control(precise, *)` | `float_control(except, *)` | `fenv_access(*)` | `fp_contract(*)` |
114115
|--|--|--|--|--|
115-
| `/fp:fast` | `off` | `off` | `off` | `on` |
116-
| `/fp:precise` | `on` | `off` | `off` | `on` |
117-
| `/fp:strict` | `on` | `on` | `on` | `off` |
116+
| **`/fp:fast`** | `off` | `off` | `off` | `on` |
117+
| **`/fp:precise`** | `on` | `off` | `off` | `on`\* |
118+
| **`/fp:strict`** | `on` | `on` | `on` | `off` |
119+
120+
\* In versions of Visual Studio starting with Visual Studio 2022, the **`/fp:precise`** behavior defaults to `fp_contract(off)`.
118121

119122
::: moniker-end
120123

0 commit comments

Comments
 (0)