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/preprocessor/compiler-warnings-that-are-off-by-default.md
+13-4Lines changed: 13 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,7 +115,7 @@ The following warnings are turned off by default in Visual Studio 2015 and later
115
115
|[C4841](../error-messages/compiler-warnings/c4841.md) (level 4) | non-standard extension used: compound member designator used in offsetof |
116
116
| C4842 (level 4) | the result of 'offsetof' applied to a type using multiple inheritance is not guaranteed to be consistent between compiler releases |
117
117
|[C4866](../error-messages/compiler-warnings/c4866.md) (level 4) | '*file*(*line-number*)' compiler may not enforce left-to-right evaluation order for call to *operator*|
118
-
|[C4868](../error-messages/compiler-warnings/compiler-warning-c4868.md) (level 4) | '_file_(*line_number*)' compiler may not enforce left-to-right evaluation order in braced initialization list |
118
+
|[C4868](../error-messages/compiler-warnings/compiler-warning-c4868.md) (level 4) | '*file*(*line_number*)' compiler may not enforce left-to-right evaluation order in braced initialization list |
|[C4906](../error-messages/compiler-warnings/compiler-warning-level-1-c4906.md) (level 1) | string literal cast to 'LPWSTR' |
121
121
|[C4917](../error-messages/compiler-warnings/compiler-warning-level-1-c4917.md) (level 1) | '*declarator*': a GUID can only be associated with a class, interface, or namespace |
@@ -135,6 +135,9 @@ The following warnings are turned off by default in Visual Studio 2015 and later
135
135
| C5029 (level 4) | nonstandard extension used: alignment attributes in C++ apply to variables, data members and tag types only |
136
136
| C5031 (level 4) | #pragma warning(pop): likely mismatch, popping warning state pushed in different file <sup>14.1</sup> |
137
137
| C5032 (level 4) | detected #pragma warning(push) with no corresponding #pragma warning(pop) <sup>14.1</sup> |
138
+
139
+
| Warning | Message |
140
+
|--|--|
138
141
| C5034 | use of intrinsic '*intrinsic*' causes function *function-name* to be compiled as guest code <sup>15.3</sup> |
139
142
| C5035 | use of feature '*feature*' causes function *function-name* to be compiled as guest code <sup>15.3</sup> |
140
143
| C5036 (level 1) | varargs function pointer conversion when compiling with /hybrid:x86arm64 '*type1*' to '*type2*' <sup>15.3</sup> |
@@ -143,7 +146,10 @@ The following warnings are turned off by default in Visual Studio 2015 and later
143
146
| C5041 (level 4) | '*member-name*': out-of-line definition for constexpr static data member is not needed and is deprecated in C++17. <sup>15.2</sup> |
144
147
| C5042 (level 3) | '*function*': function declarations at block scope cannot be specified 'inline' in standard C++; remove 'inline' specifier <sup>15.5</sup> |
145
148
|[C5045](../error-messages/compiler-warnings/c5045.md)| Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified <sup>15.7</sup> |
146
-
| C5052 (level 3) | Keyword '*keyword-name*' was introduced in C++*version* and requires use of the '*option*' command-line option` <sup>16.1</sup> |
149
+
150
+
| Warning | Message |
151
+
|--|--|
152
+
| C5052 (level 3) | Keyword '*keyword-name*' was introduced in C++ *version* and requires use of the '*option*' command-line option` <sup>16.1</sup> |
147
153
| C5204 (level 3) | A class with virtual functions has non-virtual trivial destructor. <sup>16.5</sup> |
148
154
| C5214 (level 4) | applying '*keyword*' to an operand with a volatile qualified type is deprecated in C++20 <sup>16.7</sup> |
149
155
| C5215 (level 4) | '*function-parameter*' a function parameter with a volatile qualified type is deprecated in C++20 <sup>16.7</sup> |
@@ -158,14 +164,17 @@ The following warnings are turned off by default in Visual Studio 2015 and later
158
164
| C5246 (level 1) | '*member*': the initialization of a subobject should be wrapped in braces <sup>16.10</sup> |
159
165
|[C5247 (level 1)](../error-messages/compiler-warnings/c5247.md)| Section '*section-name*' is reserved for C++ dynamic initialization. Manually creating the section will interfere with C++ dynamic initialization and may lead to undefined behavior <sup>16.11</sup> |
160
166
|[C5248 (level 1)](../error-messages/compiler-warnings/c5248.md)| Section '*section-name*' is reserved for C++ dynamic initialization. Variable manually put into the section may be optimized out and its order relative to compiler generated dynamic initializers is unspecified <sup>16.11</sup> |
167
+
168
+
| Warning | Message |
169
+
|--|--|
161
170
| C5249 (level 1) | '*bitfield*' of type '*enumeration_name*' has named enumerators with values that cannot be represented in the given bit field width of '*bitfield_width*'. <sup>17.0</sup> |
162
171
| C5250 (level 3) | '*function_name*': intrinsic function not declared. <sup>17.0</sup> |
163
172
| C5251 (level 4) |*segment-name* changed after including header <sup>17.1</sup> |
164
173
| C5254 (level 4) | language feature 'terse static assert' requires compiler flag '/std:c++17' <sup>17.1</sup> |
165
174
| C5256 (level 1) | '*enumeration*': a non-defining declaration of an enumeration with a fixed underlying type is only permitted as a standalone declaration <sup>17.2</sup> |
166
175
| C5258 (level 4) | explicit capture of '*symbol*' is not required for this use <sup>17.2</sup> |
| C5262 (level 1) | implicit fall-through occurs here; are you missing a break statement? Use `[[fallthrough]]` when a `break` statement is intentionally omitted between cases <sup>17.4</sup> |
| C5262 (level 1) | implicit fall-through occurs here; are you missing a `break` statement? Use `[[fallthrough]]` when a `break` statement is intentionally omitted between cases <sup>17.4</sup> |
169
178
| C5263 (level 4) | calling '`std::move`' on a temporary object prevents copy elision <sup>17.4</sup> |
170
179
| C5264 (level 4) | '*variable-name*': 'const' variable is not used <sup>17.4</sup> |
0 commit comments