Skip to content

Commit 62c3edb

Browse files
Merge pull request #5553 from Rastaban/docs-editor/compiler-warnings-by-compiler-1713477148
Update compiler-warnings-by-compiler-version.md
2 parents 957fc68 + 003bc17 commit 62c3edb

File tree

1 file changed

+49
-6
lines changed

1 file changed

+49
-6
lines changed

docs/error-messages/compiler-warnings/compiler-warnings-by-compiler-version.md

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,37 +50,80 @@ These versions of the compiler introduced new warnings:
5050
| Visual Studio 2022 version 17.5 | 19.35 |
5151
| Visual Studio 2022 version 17.6 | 19.36 |
5252
| Visual Studio 2022 version 17.7 | 19.37 |
53+
| Visual Studio 2022 version 17.8 | 19.38 |
54+
| Visual Studio 2022 version 17.9 | 19.39 |
55+
| Visual Studio 2022 version 17.10 | 19.40 |
56+
5357

5458
You can specify only the major number, the major and minor numbers, or the major, minor, and build numbers to the **`/Wv`** option. The compiler reports all warnings that match versions that begin with the specified number. It suppresses all warnings for versions greater than the specified number. For example, **`/Wv:17`** reports warnings introduced in or before any version of Visual Studio 2012, and suppresses warnings introduced by any compiler from Visual Studio 2013 (version 18) or later. To suppress warnings introduced in Visual Studio 2015 update 2 and later, you can use **`/Wv:19.00.23506`**. Use **`/Wv:19.11`** to report the warnings introduced in any version of Visual Studio before Visual Studio 2017 version 15.5, but suppress warnings introduced in Visual Studio 2017 version 15.5 and later.
5559

5660
The following sections list the warnings introduced by each version of Visual C++ that you can suppress by using the **`/Wv`** compiler option. The **`/Wv`** option can't suppress warnings that aren't listed, which predate the specified versions of the compiler.
5761

5862
::: moniker range=">= msvc-170"
5963

64+
## Warnings introduced in Visual Studio 2022 version 17.10 (compiler version 19.40)
65+
66+
These warnings, and all warnings in later versions, are suppressed by using the compiler option **`/Wv:19.40`**.
67+
68+
| Warning | Message |
69+
|--|--|
70+
|C4859 | '*value*' is not a valid argument for '`/presetWarn`': it must be a decimal value > 0. Command-line flag ignored|
71+
|C4860 | '*object name*': compiler zero initialized '*number*' bytes of storage|
72+
|C4861 | compiler zero initialized '*number*' bytes of storage|
73+
|C5273 | behavior change: `_Alignas` on anonymous type no longer ignored (promoted members will align)|
74+
|C5274 | behavior change: `_Alignas` no longer applies to the type '*type*' (only applies to declared data objects)|
75+
|C5275 | facade assembly '*name*' being imported under '`/clr`'; missing option '`/clr:netcore`'?|
76+
|C5304 | a declaration designated by the using-declaration '*name1*' exported from this module has internal linkage and using such a name outside the module is ill-formed; consider declaring '*name2*' '`inline`' to use it outside of this module|
77+
|C5305 | '*name*': an explicit instantiation declaration that follows an explicit instantiation definition is ignored|
78+
79+
## Warnings introduced in Visual Studio 2022 version 17.9 (compiler version 19.39)
80+
81+
These warnings, and all warnings in later versions, are suppressed by using the compiler option **`/Wv:19.39`**.
82+
83+
| Warning | Message |
84+
|--|--|
85+
|C4975 | modopt '[*modifier*]' was ignored for formal parameter '*parameter*'|
86+
|C5272 | throwing an object of non-copyable type '*type*' is non-standard. If a copy is needed at runtime it will be made as if by `memcpy`.|
87+
88+
## Warnings introduced in Visual Studio 2022 version 17.8 (compiler version 19.38)
89+
90+
These warnings, and all warnings in later versions, are suppressed by using the compiler option **`/Wv:19.38`**.
91+
92+
| Warning | Message |
93+
|--|--|
94+
|C5109|`__VA_OPT__` use in macro requires '`/Zc:preprocessor`'|
95+
|C5110|`__VA_OPT__` is an extension prior to C++20 or C23|
96+
|C5271 | previously imported assembly '*assembly1*' has the same name as assembly '*assembly2*' being imported. Is this intentional?|
97+
|C5303 | function marked with `[[msvc::intrinsic]]` did not result in a no-op cast|
98+
6099
## Warnings introduced in Visual Studio 2022 version 17.7 (compiler version 19.37)
61100

62101
These warnings, and all warnings in later versions, are suppressed by using the compiler option **`/Wv:19.36`**.
63102

64103
| Warning | Message |
65104
|--|--|
66-
| [C5267](c5267.md) | definition of implicit copy constructor/assignment operator for '*type*' is deprecated because it has a user-provided assignment operator/copy constructor |
105+
|C4907|multiple calling conventions cannot be specified; last given will be used|
106+
|[C5267](c5267.md) | definition of implicit copy constructor/assignment operator for '*type*' is deprecated because it has a user-provided assignment operator/copy constructor|
107+
|C5268 | Failed to allocate memory at fixed address 0x*address*. Use `/Yb` to specify a specific address base if bit-identical .pch files are required.|
108+
|C5269 | Failed to allocate PCH memory at fixed address 0x*address*. Use `/Ym` to specify a specific address base if bit-identical .pch files are required.|
109+
|C5270 | '*value*' is not allowed for option '*switch name*'; allowed values are: *value list*|
67110

68111
## Warnings introduced in Visual Studio 2022 version 17.6 (compiler version 19.36)
69112

70113
These warnings, and all warnings in later versions, are suppressed by using the compiler option **`/Wv:19.35`**.
71114

72115
| Warning | Message |
73116
|--|--|
74-
| [C5266](compiler-warning-level-4-c5266.md) | 'const' qualifier on return type has no effect |
117+
|[C5266](compiler-warning-level-4-c5266.md) | 'const' qualifier on return type has no effect|
75118

76119
## Warnings introduced in Visual Studio 2022 version 17.5 (compiler version 19.35)
77120

78121
These warnings, and all warnings in later versions, are suppressed by using the compiler option **`/Wv:19.34`**.
79122

80123
| Warning | Message |
81124
|--|--|
82-
| C5082 | second argument to '`va_start`' is not the last named parameter |
83-
| C5265 | cannot open search path '*pathname*' |
125+
|C5082|second argument to 'va_start' is not the last named parameter|
126+
|C5265 | cannot open search path '*path*'|
84127

85128
## Warnings introduced in Visual Studio 2022 version 17.4 (compiler version 19.34)
86129

@@ -115,8 +158,8 @@ These warnings, and all warnings in later versions, are suppressed by using the
115158
| C5257 | '*enumeration*': enumeration was previously declared without a fixed underlying type |
116159
| C5258 | explicit capture of '*symbol*' is not required for this use |
117160
| C5300 | '#pragma omp atomic': left operand of '*operator*' must match left hand side of assignment-expression |
118-
| [C5301](c5301-c5302.md) | '#pragma omp for': '*symbol*' increases while loop condition uses '*comparison*'; non-terminating loop? |
119-
| [C5302](c5301-c5302.md) | '#pragma omp for': '*symbol*' decreases while loop condition uses '*comparison*'; non-terminating loop? |
161+
|[C5301](c5301-c5302.md) | '#pragma omp for': '*loop-index*' increases while loop condition uses '*comparison*'; non-terminating loop?|
162+
|[C5302](c5301-c5302.md) | '#pragma omp for': '*loop-index*' decreases while loop condition uses '*comparison*'; non-terminating loop?|
120163

121164
## Warnings introduced in Visual Studio 2022 version 17.1 (compiler version 19.31)
122165

0 commit comments

Comments
 (0)