Skip to content

Commit 2c1517e

Browse files
authored
Merge pull request #5730 from Rageking8/structure-warning-references-in-range-c4701-c4750
Structure warning references in range [C4701, C4750]
2 parents 5ea57af + 8e31443 commit 2c1517e

30 files changed

+169
-119
lines changed

docs/error-messages/compiler-warnings/compiler-warning-c4746.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
2-
description: "Learn more about: Compiler Warning C4746"
32
title: "Compiler Warning C4746"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning C4746"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4746"]
66
helpviewer_keywords: ["C4746"]
7-
ms.assetid: 5e79ab46-6031-499a-a986-716c866b6c0e
87
---
98
# Compiler Warning C4746
109

11-
volatile access of '\<expression>' is subject to /volatile:[iso\|ms] setting; consider using __iso_volatile_load/store intrinsic functions.
10+
> volatile access of '\<expression>' is subject to /volatile:[iso\|ms] setting; consider using __iso_volatile_load/store intrinsic functions.
11+
12+
## Remarks
1213

1314
C4746 is emitted whenever a volatile variable is accessed directly. It's intended to help developers identify code locations that are affected by the specific volatile model currently specified (which can be controlled with the [`/volatile`](../../build/reference/volatile-volatile-keyword-interpretation.md) compiler option). In particular, it can be useful in locating compiler-generated hardware memory barriers when `/volatile:ms` is used.
1415

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4711.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4711"
32
title: "Compiler Warning (level 1) C4711"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 1) C4711"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4711"]
66
helpviewer_keywords: ["C4711"]
7-
ms.assetid: 270506ab-fead-4328-b714-2978113be238
87
---
98
# Compiler Warning (level 1) C4711
109

11-
function 'function' selected for inline expansion
10+
> function 'function' selected for inline expansion
11+
12+
## Remarks
1213

1314
The compiler performed inlining on the given function, although it was not marked for inlining.
1415

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4715.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4715"
32
title: "Compiler Warning (level 1) C4715"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 1) C4715"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4715"]
66
helpviewer_keywords: ["C4715"]
7-
ms.assetid: 1c819bf7-0d8b-4f5e-b338-9cc292870439
87
---
98
# Compiler Warning (level 1) C4715
109

11-
'function' : not all control paths return a value
10+
> 'function' : not all control paths return a value
11+
12+
## Remarks
1213

1314
The specified function can potentially not return a value.
1415

1516
## Example
1617

18+
The following example generates C4715:
19+
1720
```cpp
1821
// C4715a.cpp
1922
// compile with: /W1 /LD

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4716.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4716"
32
title: "Compiler Warning (level 1) C4716"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 1) C4716"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4716"]
66
helpviewer_keywords: ["C4716"]
7-
ms.assetid: d95ecfe5-870f-461f-a746-7913af98414b
87
---
98
# Compiler Warning (level 1) C4716
109

11-
'function' must return a value
10+
> 'function' must return a value
11+
12+
## Remarks
1213

1314
The given function did not return a value.
1415

@@ -18,7 +19,9 @@ An undefined value will be returned when this function is called.
1819

1920
This warning is automatically promoted to an error. If you wish to modify this behavior, use [#pragma warning](../../preprocessor/warning.md).
2021

21-
The following sample generates C4716:
22+
## Example
23+
24+
The following example generates C4716:
2225

2326
```cpp
2427
// C4716.cpp

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4717.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4717"
32
title: "Compiler Warning (level 1) C4717"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 1) C4717"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4717"]
66
helpviewer_keywords: ["C4717"]
7-
ms.assetid: 5ef3c6c7-8599-4714-a973-0f5b69cdab3c
87
---
98
# Compiler Warning (level 1) C4717
109

11-
'function' : recursive on all control paths, function will cause runtime stack overflow
10+
> 'function' : recursive on all control paths, function will cause runtime stack overflow
11+
12+
## Remarks
1213

1314
Every path through a function contains a call to the function. Since there is no way to exit the function without first calling itself recursively, the function will never exit.
1415

15-
The following sample generates C4717:
16+
## Example
17+
18+
The following example generates C4717:
1619

1720
```cpp
1821
// C4717.cpp

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4722.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@ helpviewer_keywords: ["C4722"]
77
---
88
# Compiler Warning (level 1) C4722
99

10-
'function' : destructor never returns, potential memory leak
10+
> 'function' : destructor never returns, potential memory leak
11+
12+
## Remarks
1113

1214
The flow of control terminates in a destructor. The thread or the entire program will terminate and allocated resources may not be released. Furthermore, if a destructor will be called for stack unwinding during exception processing, the behavior of executable is undefined.
1315

1416
To resolve, remove the function call that causes the destructor to not return.
1517

1618
## Example
1719

18-
The following sample generates C4722:
20+
The following example generates C4722:
1921

2022
```cpp
2123
// C4722.cpp

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4727.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4727"
32
title: "Compiler Warning (level 1) C4727"
4-
ms.date: "08/19/2019"
3+
description: "Learn more about: Compiler Warning (level 1) C4727"
4+
ms.date: 08/19/2019
55
f1_keywords: ["C4727"]
66
helpviewer_keywords: ["C4727"]
7-
ms.assetid: 991b0087-3a50-40f5-9cdb-cdc367cd472c
87
---
98
# Compiler Warning (level 1) C4727
109

11-
"PCH named pch_file with same timestamp found in obj_file_1 and obj_file_2. Using first PCH.
10+
> "PCH named pch_file with same timestamp found in obj_file_1 and obj_file_2. Using first PCH.
11+
12+
## Remarks
1213

1314
> [!NOTE]
1415
> In Visual Studio 2017 and earlier, the precompiled header is called *stdafx.h* by default, and in Visual Studio 2019 and later, it is called *pch.h* by default.
@@ -17,6 +18,8 @@ C4727 occurs when compiling multiple compilands with **/Yc**, and where the comp
1718

1819
To resolve, compile one source file with **/Yc /c** (creates pch), and the others compile separately with **/Yu /c** (uses pch), then link them together.
1920

21+
## Example
22+
2023
So, if you did the following and it generates C4727:
2124

2225
::: moniker range="<=msvc-150"

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4729.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
2-
description: "Learn more about: Compiler Warning (Level 1) C4729"
32
title: "Compiler Warning (Level 1) C4729"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (Level 1) C4729"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4729"]
66
helpviewer_keywords: ["C4729"]
7-
ms.assetid: 36a0151f-f258-48d9-9444-ae6d41ff70a4
87
---
98
# Compiler Warning (Level 1) C4729
109

11-
function too big for flow graph based warnings
10+
> function too big for flow graph based warnings
11+
12+
## Remarks
1213

1314
This warning is generated when a function is too big to be compiled with reliable checking for situations that would generate a warning. This warning is only generated when the [/Od](../../build/reference/od-disable-debug.md) compiler option used.
1415

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4730.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
---
2-
description: "Learn more about: Compiler Warning (Level 1) C4730"
32
title: "Compiler Warning (Level 1) C4730"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (Level 1) C4730"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4730"]
66
helpviewer_keywords: ["C4730"]
7-
ms.assetid: 11303e3f-162b-4b19-970a-479686123a68
87
---
98
# Compiler Warning (Level 1) C4730
109

11-
'main' : mixing _m64 and floating point expressions may result in incorrect code
10+
> 'main' : mixing _m64 and floating point expressions may result in incorrect code
11+
12+
## Remarks
1213

1314
A function uses [__m64](../../cpp/m64.md) and **`float`**/**`double`** types. Because the MMX and floating-point registers share the same physical register space (cannot be used simultaneously), using **`__m64`** and **`float`**/**`double`** types in the same function can result in data corruption, possibly causing an exception.
1415

1516
To safely use **`__m64`** types and floating-point types in the same function, each instruction that uses one of the types should be separated by the **_m_empty()** (for MMX) or **_m_femms()** (for 3DNow!) intrinsic.
1617

17-
The following sample generates C4730:
18+
## Example
19+
20+
The following example generates C4730:
1821

1922
```cpp
2023
// C4730.cpp

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4731.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Warning (Level 1) C4731"
32
title: "Compiler Warning (Level 1) C4731"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (Level 1) C4731"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4731"]
66
helpviewer_keywords: ["C4731"]
7-
ms.assetid: 5658c24c-3e6f-4505-835b-1fb92d47cab0
87
---
98
# Compiler Warning (Level 1) C4731
109

11-
'pointer' : frame pointer register 'register' modified by inline assembly code
10+
> 'pointer' : frame pointer register 'register' modified by inline assembly code
11+
12+
## Remarks
1213

1314
A frame pointer register was modified. You must save and restore the register in your inline assembly block or frame variable (local or parameter, depending on the register modified), or your code may not work properly.
1415

15-
The following sample generates C4731:
16+
## Example
17+
18+
The following example generates C4731:
1619

1720
```cpp
1821
// C4731.cpp

0 commit comments

Comments
 (0)