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-warning-level-1-c4165.md
+10-9Lines changed: 10 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,27 @@
1
1
---
2
-
description: "Learn more about: Compiler Warning (level 1) C4165"
3
-
title: "Compiler Warning (level 1) C4165"
2
+
description: "Learn more about: Compiler Warning (level 3, off) C4165"
3
+
title: "Compiler Warning (level 3, off) C4165"
4
4
ms.date: "11/04/2016"
5
5
f1_keywords: ["C4165"]
6
6
helpviewer_keywords: ["C4165"]
7
-
ms.assetid: f5bed515-2290-4f88-8dab-b45d95fe26ef
8
7
---
9
-
# Compiler Warning (level 1) C4165
8
+
# Compiler Warning (level 3, off) C4165
10
9
11
-
'HRESULT' is being converted to 'bool'; are you sure this is what you want?
10
+
'`HRESULT`' is being converted to '`bool`'; are you sure this is what you want?
12
11
13
-
When using an HRESULT in an [if](../../cpp/if-else-statement-cpp.md) statement, the HRESULT will be converted to a [bool](../../cpp/bool-cpp.md) unless you explicitly test for the variable as an HRESULT. This warning is off by default.
12
+
When an `HRESULT` is used in an [`if`](../../cpp/if-else-statement-cpp.md) statement, the `HRESULT` is converted to a [`bool`](../../cpp/bool-cpp.md) unless you explicitly test for the variable as an `HRESULT`.
13
+
14
+
Warning C4165 is off by default. For more information, see [Compiler Warnings That Are Off By Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md).
Copy file name to clipboardExpand all lines: docs/error-messages/compiler-warnings/compiler-warnings-c4000-through-c4199.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ The articles in this section of the documentation explain a subset of the warnin
15
15
16
16
|Warning|Message|
17
17
|-------------|-------------|
18
-
|Compiler warning C4000|UNKNOWN WARNING<br /><br /> Please choose the Technical Support command on the Visual C++<br /><br/> Help menu, or open the Technical Support help file for more information|
18
+
|Compiler warning C4000|UNKNOWN WARNING<br/> Please choose the Technical Support command on the Visual C++<br/> Help menu, or open the Technical Support help file for more information|
19
19
|[Compiler warning (level 4) C4001](../../error-messages/compiler-warnings/compiler-warning-level-4-c4001.md)|nonstandard extension 'single line comment' was used|
20
20
|[Compiler warning (level 1) C4002](compiler-warning-level-1-c4002.md)|too many actual parameters for macro 'identifier'|
21
21
|[Compiler warning (level 1) C4003](../../error-messages/compiler-warnings/compiler-warning-level-1-c4003.md)|not enough actual parameters for macro 'identifier'|
@@ -70,7 +70,7 @@ The articles in this section of the documentation explain a subset of the warnin
70
70
|[Compiler warning (level 3) C4073](../../error-messages/compiler-warnings/compiler-warning-level-3-c4073.md)|initializers put in library initialization area|
71
71
|[Compiler warning (level 1) C4074](../../error-messages/compiler-warnings/compiler-warning-level-1-c4074.md)|initializers put in compiler reserved initialization area|
72
72
|[Compiler warning (level 1) C4075](compiler-warning-level-1-c4075.md)|initializers put in unrecognized initialization area|
73
-
|[Compiler warning (level 1) C4076](compiler-warning-level-1-c4076.md)|'type_modifier': can not be used with type 'typename'|
73
+
|[Compiler warning (level 1) C4076](compiler-warning-level-1-c4076.md)|'type_modifier': can't be used with type 'typename'|
|[Compiler warning (level 1) C4080](compiler-warning-level-1-c4080.md)|expected identifier for segment name; found 'symbol'|
@@ -135,7 +135,7 @@ The articles in this section of the documentation explain a subset of the warnin
135
135
|[Compiler warning (level 1) C4162](../../error-messages/compiler-warnings/compiler-warning-level-1-c4162.md)|'identifier': no function with C linkage found|
136
136
|[Compiler warning (level 1) C4163](compiler-warning-level-1-c4163.md)|'identifier': not available as an intrinsic function|
137
137
|[Compiler warning (level 1) C4164](compiler-warning-level-1-c4164.md)|'function': intrinsic function not declared|
138
-
|[Compiler warning (level 1) C4165](compiler-warning-level-1-c4165.md)|'HRESULT' is being converted to 'bool'; are you sure this is what you want?|
138
+
|[Compiler warning (level 3, off) C4165](compiler-warning-level-1-c4165.md)|'HRESULT' is being converted to 'bool'; are you sure this is what you want?|
139
139
|[Compiler warning (level 1) C4166](compiler-warning-level-1-c4166.md)|illegal calling convention for constructor/destructor|
140
140
|[Compiler warning (level 1) C4167](compiler-warning-level-1-c4167.md)|'function': only available as an intrinsic function|
141
141
|[Compiler warning (level 1) C4168](compiler-warning-level-1-c4168.md)|compiler limit: out of debugger types, delete program database 'database' and rebuild|
Copy file name to clipboardExpand all lines: docs/error-messages/compiler-warnings/compiler-warnings-c4800-through-c4999.md
+28Lines changed: 28 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ The articles in this section of the documentation explain a subset of the warnin
16
16
| Warning | Message |
17
17
|--|--|
18
18
|[Compiler warning (level 4, off) C4800](compiler-warning-level-3-c4800.md)| Implicit conversion from '*type*' to `bool`. Possible information loss |
19
+
|Compiler warning C4801|Return by reference is not verifiable: *message*|
19
20
|[Compiler warning (level 1) C4803](compiler-warning-level-1-c4803.md)| '*method*': the raise method has a different storage class from that of the event, '*event*' |
20
21
|[Compiler warning (level 1) C4804](compiler-warning-level-1-c4804.md)| '*operation*': unsafe use of type '`bool`' in operation |
21
22
|[Compiler warning (level 1) C4805](compiler-warning-level-1-c4805.md)| '*operation*': unsafe mix of type '*type1*' and type '*type2*' in operation |
@@ -27,6 +28,7 @@ The articles in this section of the documentation explain a subset of the warnin
27
28
|[Compiler warning (level 1) C4811](compiler-warning-level-1-c4811.md)| value of `pragma conform(forScope, show)` == *value*|
|[Compiler warning (level 1) C4813](compiler-warning-level-1-c4813.md)| '*function*': a friend function of a local class must have been previously declared |
31
+
|Compiler warning (level 4) C4815|'*object name*': zero-sized array in stack object will have no elements (unless the object is an aggregate that has been aggregate initialized)|
30
32
|[Compiler warning (level 4) C4816](compiler-warning-level-4-c4816.md)| '*param*': parameter has a zero-sized array which will be truncated (unless the object is passed by reference) |
31
33
|[Compiler warning (level 1) C4817](compiler-warning-level-1-c4817.md)| '*member*': illegal use of '.' to access this member; compiler replaced with '->' |
32
34
|[Compiler warning (level 1) C4819](compiler-warning-level-1-c4819.md)| The file contains a character that cannot be represented in the current code page (number). Save the file in Unicode format to prevent data loss |
@@ -36,6 +38,7 @@ The articles in this section of the documentation explain a subset of the warnin
36
38
|[Compiler warning (level 3) C4823](compiler-warning-level-3-c4823.md)| '*function*': uses pinning pointers but unwind semantics are not enabled. Consider using `/EHa`|
37
39
| Compiler warning (level 2, off) C4826 | Conversion from '*type1*' to '*type2*' is sign-extended. This may cause unexpected runtime behavior. |
38
40
| Compiler warning (level 3) C4827 | A public '`ToString`' method with 0 parameters should be marked as `virtual` and `override`|
41
+
|Compiler warning (level 1) C4828|The file contains a character starting at offset 0x*HexOffset* that is illegal in the current source character set (codepage *codepage*).|
39
42
|[Compiler warning (level 1) C4829](compiler-warning-level-1-c4829.md)| Possibly incorrect parameters to function `main`. Consider '`int main(Platform::Array<Platform::String^>^ argv)`' |
40
43
|[Compiler warning (level 1) C4834](c4834.md)| discarding return value of function with 'nodiscard' attribute |
41
44
|[Compiler warning (level 1) C4835](compiler-warning-level-1-c4835.md)| '*variable*': the initializer for exported data will not be run until managed code is first executed in the host assembly |
@@ -51,20 +54,28 @@ The articles in this section of the documentation explain a subset of the warnin
51
54
| Compiler warning (level 4) C4846 | '*value*' is not a valid argument for '`/d1initall`': command-line flag ignored |
52
55
| Compiler warning (level 4) C4847 | '`__declspec(no_init_all)`' can only be applied to a function, a class type, or a local variable: ignored |
53
56
| Compiler warning (level 1) C4848 | support for standard attribute '`no_unique_address`' in C++17 and earlier is a vendor extension |
| Compiler warning (Level 1, error) C4854 | binding dereferenced null pointer to reference has undefined behavior |
55
59
| Compiler warning (level 1, off) C4855 | implicit capture of '`this`' via '`[=]`' is deprecated in 'version' |
56
60
| Compiler warning (level 4) C4856 | '*value*' is not a valid argument for '`/d1initAll:FillPattern`' (value must be between 0 and 255). Command-line flag ignored |
57
61
| Compiler warning (level 1) C4857 | C++/CLI mode does not support C++ versions newer than C++17; setting language to `/std:c++17`|
|Compiler warning (level 4) C4859|'*value*' is not a valid argument for '`/presetWarn`': it must be a decimal value > 0. Command-line flag ignored|
64
+
|Compiler warning (level 4) C4860|'*object name*': compiler zero initialized '*number*' bytes of storage|
65
+
|Compiler warning (level 4) C4861|compiler zero initialized '*number*' bytes of storage|
58
66
|[Compiler warning (level 4) C4866](c4866.md)| compiler may not enforce left-to-right evaluation order for call to *operator_name*|
59
67
|[Compiler warning (level 1, error) C4867](compiler-warning-c4867.md)| '*function*': function call missing argument list; use '*call*' to create a pointer to member |
60
68
|[Compiler warning (level 4) C4868](compiler-warning-c4868.md)| '*file*(*line_number*)' compiler may not enforce left-to-right evaluation order in braced initialization list |
69
+
|Compiler warning (level 3) C4869|'`nodiscard`' may only be applied to classes, enumerations, and functions|
61
70
| Compiler warning (level 2) C4872 | floating point division by zero detected when compiling the call graph for the `concurrency::parallel_for_each` at: '*location*' |
62
71
| Compiler warning (level 1) C4880 | casting from 'const *type_1*' to '*type_2*': casting away constness from a pointer or reference may result in undefined behavior in an amp restricted function |
63
72
| Compiler warning (level 4) C4881 | the constructor and/or the destructor will not be invoked for `tile_static` variable '*variable-name*' |
64
73
| Compiler warning (level 1) C4882 | passing functors with non-const call operators to `concurrency::parallel_for_each` is deprecated |
74
+
|Compiler warning C4883|'*function name*': function size suppresses optimizations|
65
75
|[Compiler warning C4900](compiler-warning-level-1-c4900.md)| Il mismatch between '*tool1*' version '*version1*' and '*tool2*' version '*version2*' |
|Compiler warning (Error) C4907|multiple calling conventions cannot be specified; last given will be used|
68
79
|[Compiler warning (level 1) C4910](compiler-warning-level-1-c4910.md)| '\<identifier>: '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation |
69
80
|[Compiler warning (level 1) C4912](compiler-warning-level-1-c4912.md)| '*attribute*': attribute has undefined behavior on a nested UDT |
70
81
|[Compiler warning (level 4) C4913](compiler-warning-level-4-c4913.md)| user defined binary operator '`,`' exists but no overload could convert all operands, default built-in binary operator '`,`' used |
@@ -115,6 +126,8 @@ The articles in this section of the documentation explain a subset of the warnin
115
126
|[Compiler warning (level 1, Error) C4972](compiler-warning-c4972.md)| Directly modifying or treating the result of an unbox operation as an lvalue is unverifiable |
|Compiler warning (level 1) C4975|modopt '[*modifier*]' was ignored for formal parameter '*parameter*'|
130
+
|Compiler warning (level 1) C4976|invalid value '*value*' for '`/W`'; assuming '1'|
118
131
| Compiler warning (level 3) C4981 | Warbird: function '*function*' marked as __forceinline not inlined because it contains exception semantics |
119
132
| Compiler warning (level 3) C4983 | '/analyze:sarif:hashname' ignored because the argument to '/analyze:log' is a single file rather than a directory |
120
133
|[Compiler warning C4984](compiler-warning-c4984.md)| '`if constexpr`' is a C++17 language extension |
@@ -184,6 +197,8 @@ The articles in this section of the documentation explain a subset of the warnin
184
197
| Compiler warning (level 1) C5106 | macro redefined with different parameter names |
| Compiler warning (level 1) C5201 | a module declaration can appear only at the start of a translation unit unless a global module fragment is used |
189
204
| Compiler warning (level 1) C5202 | a global module fragment can only contain preprocessor directives |
@@ -248,11 +263,24 @@ The articles in this section of the documentation explain a subset of the warnin
248
263
|[Compiler warning (level 1, error, off) C5262](c5262.md)| implicit fall-through occurs here; are you missing a break statement? Use `[[fallthrough]]` when a `break` statement is intentionally omitted between cases |
249
264
| Compiler warning (level 4, off) C5263 | calling '`std::move`' on a temporary object prevents copy elision |
250
265
| Compiler warning (level 4, off) C5264 | '*variable-name*': 'const' variable is not used |
266
+
|Compiler warning (level 1) C5265|cannot open search path '*path*'|
251
267
|[Compiler warning (level 4, off) C5266](compiler-warning-level-4-c5266.md)| 'const' qualifier on return type has no effect |
252
268
|[Compiler warning C5267](c5267.md)| definition of implicit copy constructor/assignment operator for '*type*' is deprecated because it has a user-provided assignment operator/copy constructor |
269
+
|Compiler warning (level 1) 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.|
270
+
|Compiler warning (level 1) 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.|
271
+
|Compiler warning (level 3) C5270|'*value*' is not allowed for option '*switch name*'; allowed values are: *value list*|
272
+
|Compiler warning (level 4) C5271|previously imported assembly '*assembly1*' has the same name as assembly '*assembly2*' being imported. Is this intentional?|
273
+
|Compiler warning (level 1) 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`.|
274
+
|Compiler warning (level 1) C5273|behavior change: `_Alignas` on anonymous type no longer ignored (promoted members will align)|
275
+
|Compiler warning (level 1) C5274|behavior change: `_Alignas` no longer applies to the type '*type*' (only applies to declared data objects)|
276
+
|Compiler warning (Error) C5275|facade assembly '*name*' being imported under '`/clr`'; missing option '`/clr:netcore`'?|
253
277
| Compiler warning (level 1, error) C5300 | '#pragma omp atomic': left operand of '*operator*' must match left hand side of assignment-expression |
|Compiler warning (level 1) C5303|function marked with `[[msvc::intrinsic]]` did not result in a no-op cast|
281
+
|Compiler warning (level 1) 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|
282
+
|Compiler warning (level 1) C5305|'*name*': an explicit instantiation declaration that follows an explicit instantiation definition is ignored|
0 commit comments