You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/error-messages/compiler-warnings/compiler-warnings-by-compiler-version.md
+49-6Lines changed: 49 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -50,37 +50,80 @@ These versions of the compiler introduced new warnings:
50
50
| Visual Studio 2022 version 17.5 | 19.35 |
51
51
| Visual Studio 2022 version 17.6 | 19.36 |
52
52
| 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
+
53
57
54
58
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.
55
59
56
60
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.
57
61
58
62
::: moniker range=">= msvc-170"
59
63
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
+
60
99
## Warnings introduced in Visual Studio 2022 version 17.7 (compiler version 19.37)
61
100
62
101
These warnings, and all warnings in later versions, are suppressed by using the compiler option **`/Wv:19.36`**.
63
102
64
103
| Warning | Message |
65
104
|--|--|
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*|
67
110
68
111
## Warnings introduced in Visual Studio 2022 version 17.6 (compiler version 19.36)
69
112
70
113
These warnings, and all warnings in later versions, are suppressed by using the compiler option **`/Wv:19.35`**.
71
114
72
115
| Warning | Message |
73
116
|--|--|
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|
75
118
76
119
## Warnings introduced in Visual Studio 2022 version 17.5 (compiler version 19.35)
77
120
78
121
These warnings, and all warnings in later versions, are suppressed by using the compiler option **`/Wv:19.34`**.
79
122
80
123
| Warning | Message |
81
124
|--|--|
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*'|
84
127
85
128
## Warnings introduced in Visual Studio 2022 version 17.4 (compiler version 19.34)
86
129
@@ -115,8 +158,8 @@ These warnings, and all warnings in later versions, are suppressed by using the
115
158
| C5257 | '*enumeration*': enumeration was previously declared without a fixed underlying type |
116
159
| C5258 | explicit capture of '*symbol*' is not required for this use |
117
160
| C5300 | '#pragma omp atomic': left operand of '*operator*' must match left hand side of assignment-expression |
0 commit comments