diff --git a/docs/code-quality/c6031.md b/docs/code-quality/c6031.md index 5a6627f6649..541fca4ba56 100644 --- a/docs/code-quality/c6031.md +++ b/docs/code-quality/c6031.md @@ -1,10 +1,9 @@ --- title: Warning C6031 description: "Describes C++ Code Analysis warning C6031 and how to resolve it." -ms.date: 10/04/2022 +ms.date: 4/5/2024 f1_keywords: ["C6031", "RETVAL_IGNORED_FUNC_COULD_FAIL", "__WARNING_RETVAL_IGNORED_FUNC_COULD_FAIL"] helpviewer_keywords: ["C6031"] -ms.assetid: 59e1ef0a-b3ca-4ffa-bcb3-ad2bd22ece22 --- # Warning C6031 @@ -16,44 +15,48 @@ Warning C6031 indicates the caller doesn't check a function's return value for f In general, it isn't safe to assume that calls to functions requiring disk, network, memory, or other resources will succeed. The caller should always check the return value and handle error cases appropriately. Also consider using the `_Must_inspect_result_` annotation, which checks that the value is examined in a useful way. +This warning applies to both C and C++ code. + Code analysis name: `RETVAL_IGNORED_FUNC_COULD_FAIL` ## Example The following code generates warning C6031: -```cpp +```c #include -void f( ) +int main() { - fopen( "test.c", "r" ); // C4996, C6031 return value ignored + fopen("test.c", "r"); // C4996, C6031 return value ignored // code ... } ``` To correct this warning, check the return value of the function as shown in the following code: -```cpp +```c #include -void f( ) +int main() { - FILE *stream; - if ( (stream = fopen( "test.c", "r" )) == NULL ) + FILE* stream; + if ((stream = fopen("test.c", "r")) == NULL) + { return; + } // code ... } ``` The following code uses safe function `fopen_s` to correct this warning: -```cpp +```c #include -void f( ) +int main() { - FILE *stream; + FILE* stream; errno_t err; - if ( (err = fopen_s( &stream, "test.c", "r" )) !=0 ) + if ((err = fopen_s(&stream, "test.c", "r")) != 0) { // code ... } @@ -64,11 +67,14 @@ This warning is also generated if the caller ignores the return value of a funct ```cpp #include -_Check_return_ bool func(); +_Check_return_ bool func() +{ + return true; +} -void test_f() +int main() { - func(); // Warning C6031 + func(); } ``` @@ -76,11 +82,15 @@ To correct the previous warning, check the return value as shown in the followin ```cpp #include -_Check_return_ bool func(); +_Check_return_ bool func() +{ + return true; +} -void test_f() +int main() { - if ( func() ) { + if (func()) + { // code ... } } @@ -91,10 +101,12 @@ In cases where it's necessary to ignore the return value of a function, assign t ```cpp #include #include +#include #include -void f() + +int main() { - std::srand(static_cast(std::time(nullptr))); // set initial seed value to system clock + std::srand(static_cast(std::time(nullptr))); // set initial seed value to system clock std::ignore = std::rand(); // Discard the first result as the few random results are always small. // ... } diff --git a/docs/error-messages/compiler-warnings/c4371.md b/docs/error-messages/compiler-warnings/c4371.md index 0e51dcf410b..aed32ad81b3 100644 --- a/docs/error-messages/compiler-warnings/c4371.md +++ b/docs/error-messages/compiler-warnings/c4371.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Compiler Warning (level 3) C4371" -title: "Compiler Warning (level 3) C4371" +description: "Learn more about: Compiler Warning (level 3, off) C4371" +title: "Compiler Warning (level 3, off) C4371" ms.date: "01/31/2018" f1_keywords: ["C4371"] helpviewer_keywords: ["C4371"] @@ -9,6 +9,6 @@ helpviewer_keywords: ["C4371"] > '*classname*': layout of class may have changed from a previous version of the compiler due to better packing of member '*member*' -If your code relies on a particular memory layout for a class, warning C4371 tells you that the layout created by the current compiler may be different from the layout generated by previous versions of the compiler. This may be significant for serialization operations or operating system interfaces that rely on a particular memory layout. In most other cases, this warning is safe to ignore. +Warning C4371 tells you that the layout created by the current compiler may be different from the layout generated by previous versions of the compiler. This difference may be significant for serialization operations or operating system interfaces that rely on a particular memory layout. In most other cases, this warning is safe to ignore. Warning C4371 is off by default. For more information, see [Compiler Warnings That Are Off By Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md). diff --git a/docs/error-messages/compiler-warnings/c4388.md b/docs/error-messages/compiler-warnings/c4388.md index 1f8cc6b7f95..ee8b36db8d8 100644 --- a/docs/error-messages/compiler-warnings/c4388.md +++ b/docs/error-messages/compiler-warnings/c4388.md @@ -1,11 +1,11 @@ --- -title: "Compiler Warning (level 4) C4388" -description: "Microsoft C/C++ compiler warning C4388, its causes and resolution." +title: "Compiler Warning (level 4, off) C4388" +description: "Learn more about: Compiler Warning (level 4, off) C4388" ms.date: 10/16/2020 f1_keywords: ["C4388"] helpviewer_keywords: ["C4388"] --- -# Compiler Warning (level 4) C4388 +# Compiler Warning (level 4, off) C4388 > '*token*' : signed/unsigned mismatch diff --git a/docs/error-messages/compiler-warnings/compiler-warning-c4335.md b/docs/error-messages/compiler-warnings/compiler-warning-c4335.md index 3ec3cdd5d39..e57e115b0be 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-c4335.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-c4335.md @@ -1,18 +1,17 @@ --- -description: "Learn more about: Compiler Warning C4335" -title: "Compiler Warning C4335" +description: "Learn more about: Compiler Warning (level 1) C4335" +title: "Compiler Warning(level 1) C4335" ms.date: "11/04/2016" f1_keywords: ["C4335"] helpviewer_keywords: ["C4335"] -ms.assetid: e66467ad-a10b-4438-8c7c-e8e8d11d39bb --- -# Compiler Warning C4335 +# Compiler Warning (level 1) C4335 -Mac file format detected: please convert the source file to either DOS or UNIX format +> Mac file format detected: please convert the source file to either DOS or UNIX format -The line termination character of the first line of a source file is Macintosh style ('\r') as opposed to UNIX ('\n') or DOS ('\r\n'). +The line termination character of the first line of a source file is the old Macintosh style ('\r') as opposed to UNIX ('\n') or DOS ('\r\n'). -This warning is always issued as an error. See [warning](../../preprocessor/warning.md) pragma for information about how to disable this warning. Also, this warning is only issued once per compiland. Therefore, if there are multiple `#include` directives that specify files in Macintosh format, C4335 will only be issued once. +This warning is only issued once per translation unit. Therefore, if there are multiple `#include` directives that specify files in Macintosh format, C4335 is emitted once. One way to generate files in Macintosh format is by using the **Advanced Save Options** (on the **File** menu) in Visual Studio. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-c4368.md b/docs/error-messages/compiler-warnings/compiler-warning-c4368.md index 7808f627b50..0d5f9305326 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-c4368.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-c4368.md @@ -1,18 +1,17 @@ --- -description: "Learn more about: Compiler Warning C4368" -title: "Compiler Warning C4368" +description: "Learn more about: Compiler Warning (level 1, Error) C4368" +title: "Compiler Warning (level 1, Error) C4368" ms.date: "11/04/2016" f1_keywords: ["C4368"] helpviewer_keywords: ["C4368"] -ms.assetid: cb85bcee-fd3d-4aa5-b626-2324f07a4f1b --- -# Compiler Warning C4368 +# Compiler Warning (level 1, Error) C4368 -cannot define 'member' as a member of managed 'type': mixed types are not supported +> cannot define 'member' as a member of managed 'type': mixed types are not supported -You cannot embed a native data member in a CLR type. +You can't embed a native data member in a managed type. -You can, however, declare a pointer to a native type and control its lifetime in the constructor and destructor and finalizer of your managed class. For more information see [Destructors and finalizers](../../dotnet/how-to-define-and-consume-classes-and-structs-cpp-cli.md#BKMK_Destructors_and_finalizers). +You can, however, declare a pointer to a native type and control its lifetime in the constructor and destructor and finalizer of your managed class. For more information, see [Destructors and finalizers](../../dotnet/how-to-define-and-consume-classes-and-structs-cpp-cli.md#BKMK_Destructors_and_finalizers). This warning is always issued as an error. Use the [warning](../../preprocessor/warning.md) pragma to disable C4368. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-c4394.md b/docs/error-messages/compiler-warnings/compiler-warning-c4394.md index 95e4d0660aa..d49d391ea0b 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-c4394.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-c4394.md @@ -1,20 +1,19 @@ --- -description: "Learn more about: Compiler Warning C4394" -title: "Compiler Warning C4394" +description: "Learn more about: Compiler Warning (level 1, Error) C4394" +title: "Compiler Warning (level 1, Error) C4394" ms.date: "11/04/2016" f1_keywords: ["C4394"] helpviewer_keywords: ["C4394"] -ms.assetid: 5de94de0-17e3-4e7c-92f4-5c3c1b825120 --- -# Compiler Warning C4394 +# Compiler Warning (level 1, Error) C4394 -'function' : per-appdomain symbol should not be marked with __declspec(dllexport) +> 'function' : per-appdomain symbol should not be marked with __declspec(dllexport) -A function marked with the [appdomain](../../cpp/appdomain.md) **`__declspec`** modifier is compiled to MSIL (not to native), and export tables ([export](../../windows/attributes/export.md) **`__declspec`** modifier) are not supported for managed functions. +A function marked with the [appdomain](../../cpp/appdomain.md) **`__declspec`** modifier is compiled to MSIL (not native), and export tables ([export](../../windows/attributes/export.md) **`__declspec`** modifier) aren't supported for managed functions. You can declare a managed function to have public accessibility. For more information, see [Type visibility](../../dotnet/how-to-define-and-consume-classes-and-structs-cpp-cli.md#BKMK_Type_visibility) and [Member visibility](../../dotnet/how-to-define-and-consume-classes-and-structs-cpp-cli.md#BKMK_Member_visibility). -C4394 is always issued as an error. You can turn off this warning with the `#pragma warning` or **/wd**; see [warning](../../preprocessor/warning.md) or [/w, /W0, /W1, /W2, /W3, /W4, /w1, /w2, /w3, /w4, /Wall, /wd, /we, /wo, /Wv, /WX (Warning Level)](../../build/reference/compiler-option-warning-level.md) for more information. +C4394 is always issued as an error. You can turn off this warning or change its level with `#pragma warning` or **/wd**. For more information, see [warning](../../preprocessor/warning.md) or [/w, /W0, /W1, /W2, /W3, /W4, /w1, /w2, /w3, /w4, /Wall, /wd, /we, /wo, /Wv, /WX (Warning Level)](../../build/reference/compiler-option-warning-level.md). ## Example diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4264.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4264.md index 23996076bb1..4fe40000681 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4264.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4264.md @@ -1,15 +1,14 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4264" -title: "Compiler Warning (level 1) C4264" +description: "Learn more about: Compiler Warning (level 4, off) C4264" +title: "Compiler Warning (level 4, off) C4264" ms.date: "11/04/2016" f1_keywords: ["C4264"] helpviewer_keywords: ["C4264"] -ms.assetid: 315a13c1-ca54-4a90-9d2b-dd996463af5d --- -# Compiler Warning (level 1) C4264 +# Compiler Warning (level 4, off) C4264 -'virtual_function' : no override available for virtual member function from base 'class'; function is hidden +> 'virtual_function' : no override available for virtual member function from base 'class'; function is hidden C4264 is always generated after [C4263](../../error-messages/compiler-warnings/compiler-warning-level-4-c4263.md). -This warning is off by default. See [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md) for more information. +This warning is off by default. For more information, see [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md). diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4392.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4392.md index 3e6c6317c5c..79d7ebd0205 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4392.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4392.md @@ -1,18 +1,17 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4392" -title: "Compiler Warning (level 1) C4392" +description: "Learn more about: Compiler Warning (level 1, Error) C4392" +title: "Compiler Warning (level 1, Error) C4392" ms.date: "11/04/2016" f1_keywords: ["C4392"] helpviewer_keywords: ["C4392"] -ms.assetid: 817806ad-06a6-4b9e-8355-e25687c782dc --- -# Compiler Warning (level 1) C4392 +# Compiler Warning (level 1, Error) C4392 -'signature' : incorrect number of arguments for intrinsic function, expected 'number' arguments +> 'signature' : incorrect number of arguments for intrinsic function, expected 'number' arguments -A function declaration for a compiler intrinsic had the wrong number of arguments. The resulting image may not run correctly. +A function declaration for a compiler intrinsic had the wrong number of arguments. The resulting image may not run correctly. To fix this warning, either correct the declaration or delete the declaration and `#include` the appropriate header file. -To fix this warning, either correct the declaration or delete the declaration and simply #include the appropriate header file. +This warning is always issued as an error. Use the [warning](../../preprocessor/warning.md) pragma to disable or change the warning level. The following sample generates C4392: diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4399.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4399.md index a99bfcba5c7..39947ec8180 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4399.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4399.md @@ -1,12 +1,12 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4399" -title: "Compiler Warning (level 1) C4399" +description: "Learn more about: Compiler Warning (level 1, Error) C4399" +title: "Compiler Warning (level 1, Error) C4399" ms.date: "11/04/2016" f1_keywords: ["C4399"] helpviewer_keywords: ["C4399"] ms.assetid: f58d9ba7-71a0-4c3b-b26f-f946dda8af30 --- -# Compiler Warning (level 1) C4399 +# Compiler Warning (level 1, Error) C4399 > '*symbol*' : per-process symbol should not be marked with __declspec(dllimport) when compiled with /clr:pure @@ -14,7 +14,9 @@ ms.assetid: f58d9ba7-71a0-4c3b-b26f-f946dda8af30 The **/clr:pure** compiler option is deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017. -Data from a native image or an image with native and CLR constructs can not be imported into a pure image. To resolve this warning, compile with **/clr** (not **/clr:pure**) or delete `__declspec(dllimport)`. +Data from a native image or an image with native and common language runtime (CLR) constructs can't be imported into a pure image. To resolve this warning, compile with **/clr** (not **/clr:pure**) or delete `__declspec(dllimport)`. + +This warning can be issued as an error. Use the [warning](../../preprocessor/warning.md) pragma to disable or change the warning level. ## Example diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4265.md b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4265.md index fdee3d43de6..5824f4d1c6d 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4265.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4265.md @@ -1,18 +1,17 @@ --- -description: "Learn more about: Compiler Warning (level 3) C4265" -title: "Compiler Warning (level 3) C4265" +description: "Learn more about: Compiler Warning (level 3, off) C4265" +title: "Compiler Warning (level 3, off) C4265" ms.date: "11/04/2016" f1_keywords: ["C4265"] helpviewer_keywords: ["C4265"] -ms.assetid: 20547159-6f30-4cc4-83aa-927884c8bb4c --- -# Compiler Warning (level 3) C4265 +# Compiler Warning (level 3, off) C4265 -'class' : class has virtual functions, but destructor is not virtual +> 'class' : class has virtual functions, but destructor is not virtual When a class has virtual functions but a nonvirtual destructor, objects of the type might not be destroyed properly when the class is destroyed through a base class pointer. -This warning is off by default. See [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md) for more information. +This warning is off by default. For more information, see [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md). The following sample generates C4265: diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4278.md b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4278.md index bed46555980..464d6497f33 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4278.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4278.md @@ -1,15 +1,12 @@ --- -description: "Learn more about: Compiler Warning (level 3) C4278" -title: "Compiler Warning (level 3) C4278" +description: "Learn more about: Compiler Warning (level 3 and level 4) C4278" +title: "Compiler Warning (level 3 and level 4) C4278" ms.date: "08/27/2018" f1_keywords: ["C4278"] helpviewer_keywords: ["C4278"] -ms.assetid: 4b6053fb-df62-4c04-b6c8-c011759557b8 --- -# Compiler Warning (level 3) C4278 +# Compiler Warning (level 3 and level 4) C4278 > '*identifier*': identifier in type library '*tlb*' is already a macro; use the 'rename' qualifier -When using [#import](../../preprocessor/hash-import-directive-cpp.md), an identifier in the typelib you are importing is attempting to declare an identifier *identifier*. However, this is already a valid symbol. - -Use the `#import` **rename** attribute to assign an alias to the symbol in the type library. +The [`#import`](../../preprocessor/hash-import-directive-cpp.md) is attempting to import an identifier into the translation unit. However, there's already a symbol with that name. Use the `#import` **rename** attribute to assign an alias to the symbol in the type library. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4287.md b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4287.md index 4834efa3a10..989066bb6b0 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4287.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4287.md @@ -1,18 +1,17 @@ --- -description: "Learn more about: Compiler Warning (level 3) C4287" -title: "Compiler Warning (level 3) C4287" +description: "Learn more about: Compiler Warning (level 3, off) C4287" +title: "Compiler Warning (level 3, off) C4287" ms.date: "11/04/2016" f1_keywords: ["C4287"] helpviewer_keywords: ["C4287"] -ms.assetid: 1bf3bff8-6402-4d06-95ba-431678a790a7 --- -# Compiler Warning (level 3) C4287 +# Compiler Warning (level 3, off) C4287 -'operator' : unsigned/negative constant mismatch +> 'operator' : unsigned/negative constant mismatch An unsigned variable was used in an operation with a negative number. -This warning is off by default. See [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md) for more information. +This warning is off by default. For more information, see [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md). ## Example diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4359.md b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4359.md index f4f62e9759a..1323cb6fe50 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4359.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4359.md @@ -1,16 +1,15 @@ --- -description: "Learn more about: Compiler Warning (level 3) C4359" -title: "Compiler Warning (level 3) C4359" +description: "Learn more about: Compiler Warning (level 1 and level 3) C4359" +title: "Compiler Warning (level 1 and level 3) C4359" ms.date: "11/04/2016" f1_keywords: ["C4359"] helpviewer_keywords: ["C4359"] -ms.assetid: d8fe993c-ef82-45a0-a43d-c29f9d1bacdb --- -# Compiler Warning (level 3) C4359 +# Compiler Warning (level 1 and level 3) C4359 -'type': actual alignment (8) is greater than the value specified in __declspec(align()) +> 'type': actual alignment (8) is greater than the value specified in __declspec(align()) -The alignment specified for a type is less than the alignment of the type of one of its data members. For more information, see [align](../../cpp/align-cpp.md). +The alignment specified for a type is less than the alignment of the type of one of its data members. For more information, see [align](../../cpp/align-cpp.md). ## Example diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4373.md b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4373.md index ee956ccc2e3..4bcae673036 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4373.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4373.md @@ -1,24 +1,23 @@ --- -description: "Learn more about: Compiler Warning (level 3) C4373" -title: "Compiler Warning (level 3) C4373" +description: "Learn more about: Compiler Warning (level 4) C4373" +title: "Compiler Warning (level 4) C4373" ms.date: "11/04/2016" f1_keywords: ["C4373"] helpviewer_keywords: ["C4373"] -ms.assetid: 670c0ba3-b7d6-4aed-b207-1cb84da3bcde --- -# Compiler Warning (level 3) C4373 +# Compiler Warning (level 4) C4373 > '*function*': virtual function overrides '*base_function*', previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers ## Remarks -Your application contains a method in a derived class that overrides a virtual method in a base class, and the parameters in the overriding method differ by only a [const](../../cpp/const-cpp.md) or [volatile](../../cpp/volatile-cpp.md) qualifier from the parameters of the virtual method. This means the compiler must bind a function reference to the method in either the base or derived class. +Your application contains a method in a derived class that overrides a virtual method in a base class. The parameters in the overriding method differ by a [`const`](../../cpp/const-cpp.md) or [`volatile`](../../cpp/volatile-cpp.md) qualifier from the parameters of the virtual method. -Versions of the compiler prior to Visual Studio 2008 bind the function to the method in the base class, then issue a warning message. Later versions of the compiler ignore the **`const`** or **`volatile`** qualifier, bind the function to the method in the derived class, then issue warning **C4373**. The later behavior conforms to the C++ standard. +Before Visual Studio 2008, the compiler would bind the function to the method in the base class. Later versions of the compiler ignore the **`const`** or **`volatile`** qualifier, bind the function to the method in the derived class, then issue warning **C4373**. The latter behavior conforms to the C++ standard. ## Example -The following code example generates warning C4373. To resolve this issue, you can either make the override use the same CV-qualifiers as the base member function, or if you did not intend to create an override, you can give the function in the derived class a different name. +The following code example generates warning C4373. To resolve this issue, make the override use the same CV-qualifiers as the base member function. If you didn't intend to create an override, rename the function in the derived class. ```cpp // c4373.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4255.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4255.md index ff98dea558b..4358f2e093d 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4255.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4255.md @@ -1,18 +1,17 @@ --- -description: "Learn more about: Compiler Warning (level 4) C4255" -title: "Compiler Warning (level 4) C4255" +description: "Learn more about: Compiler Warning (level 4, off) C4255" +title: "Compiler Warning (level 4, off) C4255" ms.date: "11/04/2016" f1_keywords: ["C4255"] helpviewer_keywords: ["C4255"] -ms.assetid: 2087b635-4b4c-4182-8a01-c26770d2bb88 --- -# Compiler Warning (level 4) C4255 +# Compiler Warning (level 4, off) C4255 -'function' : no function prototype given: converting '()' to '(void)' +> 'function' : no function prototype given: converting '()' to '(void)' -The compiler did not find an explicit list of arguments to a function. This warning is for the C compiler only. +The compiler didn't find an explicit list of arguments to a function. This warning is for the C compiler only. -This warning is off by default. See [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md) for more information. +This warning is off by default. For more information, see [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md). The following sample generates C4255: diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4263.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4263.md index 7fa9923092f..7ea2676192a 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4263.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4263.md @@ -1,18 +1,17 @@ --- -description: "Learn more about: Compiler Warning (level 4) C4263" -title: "Compiler Warning (level 4) C4263" +description: "Learn more about: Compiler Warning (level 4, off) C4263" +title: "Compiler Warning (level 4, off) C4263" ms.date: "11/04/2016" f1_keywords: ["C4263"] helpviewer_keywords: ["C4263"] -ms.assetid: daabb05d-ab56-460f-ab6c-c74d222ef649 --- -# Compiler Warning (level 4) C4263 +# Compiler Warning (level 4, off) C4263 -'function' : member function does not override any base class virtual member function +> 'function' : member function does not override any base class virtual member function -A class function definition has the same name as a virtual function in a base class but not the same number or type of arguments. This effectively hides the virtual function in the base class. +A class function definition has the same name as a virtual function in a base class but not the same number or type of arguments. This pattern effectively hides the virtual function in the base class. -This warning is off by default. See [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md) for more information. +This warning is off by default. For more information, see [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md). The following sample generates C4263: diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4266.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4266.md index fccff4b84fa..88e8e554dfd 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4266.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4266.md @@ -1,18 +1,17 @@ --- -description: "Learn more about: Compiler Warning (level 4) C4266" -title: "Compiler Warning (level 4) C4266" +description: "Learn more about: Compiler Warning (level 4, off) C4266" +title: "Compiler Warning (level 4, off) C4266" ms.date: "11/04/2016" f1_keywords: ["C4266"] helpviewer_keywords: ["C4266"] -ms.assetid: 90ec5f5b-3451-4c16-bb1b-c30a626bdaa0 --- -# Compiler Warning (level 4) C4266 +# Compiler Warning (level 4, off) C4266 -'function' : no override available for virtual member function from base 'type'; function is hidden +> 'function' : no override available for virtual member function from base 'type'; function is hidden -A derived class did not override all overloads of a virtual function. +A derived class didn't override all overloads of a virtual function. -This warning is off by default. See [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md) for more information. +This warning is off by default. For more information, see [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md). The following sample generates C4266: diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4289.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4289.md index 3f29ff0cfa7..e12bb325ac9 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4289.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4289.md @@ -1,20 +1,19 @@ --- -description: "Learn more about: Compiler Warning (level 4) C4289" -title: "Compiler Warning (level 4) C4289" +description: "Learn more about: Compiler Warning (level 4, off) C4289" +title: "Compiler Warning (level 4, off) C4289" ms.date: "11/04/2016" f1_keywords: ["C4289"] helpviewer_keywords: ["C4289"] -ms.assetid: 0dbd2863-4cde-4e16-894b-104a2d5fa724 --- -# Compiler Warning (level 4) C4289 +# Compiler Warning (level 4, off) C4289 -nonstandard extension used : 'var' : loop control variable declared in the for-loop is used outside the for-loop scope +> nonstandard extension used : 'var' : loop control variable declared in the `for`-loop is used outside the `for`-loop scope -When compiling with [/Ze](../../build/reference/za-ze-disable-language-extensions.md) and **/Zc:forScope-**, a variable declared in a [for](../../cpp/for-statement-cpp.md) loop was used after the **`for`**-loop scope. +When [/Ze](../../build/reference/za-ze-disable-language-extensions.md) and **/Zc:forScope-** are used in a build, a variable declared in a [`for`](../../cpp/for-statement-cpp.md) loop was used after the **`for`**-loop scope. See [/Zc:forScope](../../build/reference/zc-forscope-force-conformance-in-for-loop-scope.md) for information about how to specify standard behavior in **`for`** loops with **/Ze**. -This warning is off by default. See [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md) for more information. +This warning is off by default. For more information, see [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md). The following sample generates C4289: diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4296.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4296.md index eb4f2ed99ee..39cb0b6e93b 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4296.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4296.md @@ -1,18 +1,17 @@ --- -description: "Learn more about: Compiler Warning (level 4) C4296" -title: "Compiler Warning (level 4) C4296" +description: "Learn more about: Compiler Warning (level 4, off) C4296" +title: "Compiler Warning (level 4, off) C4296" ms.date: "11/04/2016" f1_keywords: ["C4296"] helpviewer_keywords: ["C4296"] -ms.assetid: 9d99aafe-f6bd-4ee0-b8d0-98ce5712274d --- -# Compiler Warning (level 4) C4296 +# Compiler Warning (level 4, off) C4296 -'operator' : expression is always false +> 'operator' : expression is always false An unsigned variable was used in a comparison operation with zero. -This warning is off by default. See [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md) for more information. +This warning is off by default. For more information, see [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md). The following sample generates C4296: diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4339.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4339.md index 4b868b05e11..77a9a5a3e57 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4339.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4339.md @@ -1,18 +1,17 @@ --- -description: "Learn more about: Compiler Warning (level 4) C4339" -title: "Compiler Warning (level 4) C4339" +description: "Learn more about: Compiler Warning (level 4, off) C4339" +title: "Compiler Warning (level 4, off) C4339" ms.date: "11/04/2016" f1_keywords: ["C4339"] helpviewer_keywords: ["C4339"] -ms.assetid: 5b83353d-7777-4afb-8476-3c368349028c --- -# Compiler Warning (level 4) C4339 +# Compiler Warning (level 4, off) C4339 -'type' : use of undefined type detected in WinRT or CLR meta-data - use of this type may lead to a runtime exception +> 'type' : use of undefined type detected in WinRT or CLR meta-data - use of this type may lead to a runtime exception -A type was not defined in code that was compiled for Windows Runtime or the common language runtime. Define the type to avoid a possible runtime exception. +A type wasn't defined in code that was compiled for Windows Runtime or the common language runtime. Define the type to avoid a possible runtime exception. -This warning is off by default. See [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md) for more information. +This warning is off by default. For more information, see [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md). The following sample generates C4339 and shows how to fix it: diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4365.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4365.md index 931b249b132..d26dec6ad77 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4365.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4365.md @@ -1,18 +1,17 @@ --- -description: "Learn more about: Compiler Warning (level 4) C4365" -title: "Compiler Warning (level 4) C4365" +description: "Learn more about: Compiler Warning (level 4, off) C4365" +title: "Compiler Warning (level 4, off) C4365" ms.date: "11/04/2016" f1_keywords: ["C4365"] helpviewer_keywords: ["C4365"] -ms.assetid: af4b4191-bdfd-4dbb-8229-3ba4405df257 --- -# Compiler Warning (level 4) C4365 +# Compiler Warning (level 4, off) C4365 -'action' : conversion from 'type_1' to 'type_2', signed/unsigned mismatch +> 'action' : conversion from 'type_1' to 'type_2', signed/unsigned mismatch -For example, you tried to convert an unsigned value to a signed value. +For example, you tried to convert an unsigned value to a signed value. This pattern can cause unexpected results when the source value at runtime in not in the range of the destination type. Such as a negative value being converted into a signed value. -C4365 is off by default. For more information, see [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md). +C4365 is off by default. For more information, see [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md). ## Example diff --git a/docs/error-messages/compiler-warnings/compiler-warnings-c4200-through-c4399.md b/docs/error-messages/compiler-warnings/compiler-warnings-c4200-through-c4399.md index 4961aca1fd5..161e23b8610 100644 --- a/docs/error-messages/compiler-warnings/compiler-warnings-c4200-through-c4399.md +++ b/docs/error-messages/compiler-warnings/compiler-warnings-c4200-through-c4399.md @@ -6,7 +6,7 @@ f1_keywords: ["C4203", "C4277", "C4279", "C4298", "C4299", "C4301", "C4303", "C4 --- # Compiler warnings C4200 through C4399 -The articles in this section of the documentation explain a subset of the warning messages that are generated by the compiler. +The articles in this section of the documentation explain a subset of the warning messages that the compiler generates. [!INCLUDE[error-boilerplate](../../error-messages/includes/error-boilerplate.md)] @@ -14,166 +14,166 @@ The articles in this section of the documentation explain a subset of the warnin |Warning|Message| |-------------|-------------| -|[Compiler warning (levels 2 and 4) C4200](../../error-messages/compiler-warnings/compiler-warning-levels-2-and-4-c4200.md)|nonstandard extension used: zero-sized array in struct/union| -|[Compiler warning (level 4) C4201](../../error-messages/compiler-warnings/compiler-warning-level-4-c4201.md)|nonstandard extension used: nameless struct/union| -|[Compiler warning (level 4) C4202](../../error-messages/compiler-warnings/compiler-warning-level-4-c4202.md)|nonstandard extension used: '...': prototype parameter in name list illegal| +|[Compiler warning (levels 2 and 4) C4200](compiler-warning-levels-2-and-4-c4200.md)|nonstandard extension used: zero-sized array in struct/union| +|[Compiler warning (level 4) C4201](compiler-warning-level-4-c4201.md)|nonstandard extension used: nameless struct/union| +|[Compiler warning (level 4) C4202](compiler-warning-level-4-c4202.md)|nonstandard extension used: '...': prototype parameter in name list illegal| |Compiler warning C4203|nonstandard extension used: union with static member variable| -|[Compiler warning (level 4) C4204](../../error-messages/compiler-warnings/compiler-warning-level-4-c4204.md)|nonstandard extension used: non-constant aggregate initializer| -|[Compiler warning (level 4) C4205](../../error-messages/compiler-warnings/compiler-warning-level-4-c4205.md)|nonstandard extension used: static function declaration in function scope| -|[Compiler warning (level 4) C4206](../../error-messages/compiler-warnings/compiler-warning-level-4-c4206.md)|nonstandard extension used: translation unit is empty| -|[Compiler warning (level 4) C4207](../../error-messages/compiler-warnings/compiler-warning-level-4-c4207.md)|nonstandard extension used: extended initializer form| -|[Compiler warning (level 4) C4208](../../error-messages/compiler-warnings/compiler-warning-level-4-c4208.md)|nonstandard extension used: delete [exp] - exp evaluated but ignored| -|[Compiler warning (level 4) C4210](../../error-messages/compiler-warnings/compiler-warning-level-4-c4210.md)|nonstandard extension used: function given file scope| -|[Compiler warning (level 4) C4211](../../error-messages/compiler-warnings/compiler-warning-level-4-c4211.md)|nonstandard extension used: redefined extern to static| -|[Compiler warning (level 4) C4212](../../error-messages/compiler-warnings/compiler-warning-level-4-c4212.md)|nonstandard extension used: function declaration used ellipsis| -|[Compiler warning (level 4) C4213](../../error-messages/compiler-warnings/compiler-warning-level-4-c4213.md)|nonstandard extension used: cast on l-value| -|[Compiler warning (level 4) C4214](../../error-messages/compiler-warnings/compiler-warning-level-4-c4214.md)|nonstandard extension used: bit field types other than int| -|[Compiler warning (level 1) C4215](../../error-messages/compiler-warnings/compiler-warning-level-1-c4215.md)|nonstandard extension used: long float| -|[Compiler warning (level 1) C4216](../../error-messages/compiler-warnings/compiler-warning-level-1-c4216.md)|nonstandard extension used: float long| -|[Compiler warning (level 1) C4218](../../error-messages/compiler-warnings/compiler-warning-level-1-c4218.md)|nonstandard extension used: must specify at least a storage class or a type| -|[Compiler warning (level 4) C4220](../../error-messages/compiler-warnings/compiler-warning-level-4-c4220.md)|varargs matches remaining parameters| -|[Compiler warning (level 4) C4221](../../error-messages/compiler-warnings/compiler-warning-level-4-c4221.md)|nonstandard extension used: '*identifier*': cannot be initialized using address of automatic variable '*variable*'| -|[Compiler warning (levels 1 and 4) C4223](../../error-messages/compiler-warnings/compiler-warning-levels-1-and-4-c4223.md)|nonstandard extension used: non-lvalue array converted to pointer| -|[Compiler warning (level 1) C4224](../../error-messages/compiler-warnings/compiler-warning-level-1-c4224.md)|nonstandard extension used: formal parameter '*identifier*' was previously defined as a type| -|[Compiler warning (level 1, Error) C4226](../../error-messages/compiler-warnings/compiler-warning-level-1-c4226.md)|nonstandard extension used: '*keyword*' is an obsolete keyword| -|[Compiler warning (level 1) C4227](../../error-messages/compiler-warnings/compiler-warning-level-1-c4227.md)|anachronism used: qualifiers on reference are ignored| -|[Compiler warning (level 1) C4228](../../error-messages/compiler-warnings/compiler-warning-level-1-c4228.md)|nonstandard extension used: qualifiers after comma in declarator list are ignored| -|[Compiler warning (level 1) C4229](../../error-messages/compiler-warnings/compiler-warning-level-1-c4229.md)|anachronism used: modifiers on data are ignored| -|[Compiler warning (level 1) C4230](../../error-messages/compiler-warnings/compiler-warning-level-1-c4230.md)|anachronism used: modifiers/qualifiers interspersed; qualifier ignored| -|[Compiler warning (level 4) C4232](../../error-messages/compiler-warnings/compiler-warning-level-4-c4232.md)|nonstandard extension used: '*identifier*': address of dllimport '*dllimport*' is not static, identity not guaranteed| -|[Compiler warning (level 4, Error) C4233](../../error-messages/compiler-warnings/compiler-warning-level-4-c4233.md)|nonstandard extension used: '*keyword*' keyword only supported in C++, not C| -|[Compiler warning (level 4, Error) C4234](../../error-messages/compiler-warnings/compiler-warning-level-4-c4234.md)|nonstandard extension used: '*keyword*' keyword reserved for future use| -|[Compiler warning (level 4, Error) C4235](../../error-messages/compiler-warnings/compiler-warning-level-4-c4235.md)|nonstandard extension used: '*keyword*' keyword not supported on this architecture| -|[Compiler warning (level 1) C4237](../../error-messages/compiler-warnings/compiler-warning-level-1-c4237.md)|'*keyword*' keyword is not yet supported, but reserved for future use| -|[Compiler warning (level 4) C4238](../../error-messages/compiler-warnings/compiler-warning-level-4-c4238.md)|nonstandard extension used: class rvalue used as lvalue| -|[Compiler warning (level 4) C4239](../../error-messages/compiler-warnings/compiler-warning-level-4-c4239.md)|nonstandard extension used: '*token*': conversion from '*type1*' to '*type2*'| -|[Compiler warning (level 3) C4240](../../error-messages/compiler-warnings/compiler-warning-level-3-c4240.md)|nonstandard extension used: access to '*classname*' now defined to be '*access_specifier1*', previously it was defined to be '*access_specifier2*'| -|[Compiler warning (level 4) C4242](../../error-messages/compiler-warnings/compiler-warning-level-4-c4242.md)|'*identifier*': conversion from '*type1*' to '*type2*', possible loss of data| -|[Compiler warning (level 3) C4243](../../error-messages/compiler-warnings/compiler-warning-level-3-c4243.md)|'*conversion_type*' conversion from '*type1*' to '*type2*' exists, but is inaccessible| -|[Compiler warning (level 2) C4244](../../error-messages/compiler-warnings/compiler-warning-level-2-c4244.md)|'*conversion_type*': conversion from '*type1*' to '*type2*', possible loss of data| -|[Compiler warning (levels 3 and 4) C4244](../../error-messages/compiler-warnings/compiler-warning-levels-3-and-4-c4244.md)|'*conversion_type*': conversion from '*type1*' to '*type2*', possible loss of data| -|[Compiler warning (level 4) C4245](../../error-messages/compiler-warnings/compiler-warning-level-4-c4245.md)|'*conversion_type*': conversion from '*type1*' to '*type2*', signed/unsigned mismatch| -|[Compiler warning (level 2) C4250](../../error-messages/compiler-warnings/compiler-warning-level-2-c4250.md)|'*classname*': inherits '*base_classname*::*member*' via dominance| -|[Compiler warning (level 1) C4251](../../error-messages/compiler-warnings/compiler-warning-level-1-c4251.md)|'*identifier*': '*object_type1*' '*identifier1*' needs to have dll-interface to be used by clients of '*object_type*' '*identfier2*'| -|[Compiler warning (level 4) C4254](../../error-messages/compiler-warnings/compiler-warning-level-4-c4254.md)|'*operator*': conversion from '*type1*:*field_bits*' to '*type2*:*field_bits*', possible loss of data| -|[Compiler warning (level 4) C4255](../../error-messages/compiler-warnings/compiler-warning-level-4-c4255.md)|'*function*': no function prototype given: converting '()' to '(void)'| -|[Compiler warning (level 4) C4256](../../error-messages/compiler-warnings/compiler-warning-level-4-c4256.md)|'*function*': constructor for class with virtual bases has '...'; calls may not be compatible with older versions of Visual C++| -|[Compiler warning (level 1) C4258](../../error-messages/compiler-warnings/compiler-warning-level-1-c4258.md)|'*variable*': definition from the for loop is ignored; the definition from the enclosing scope is used| -|[Compiler warning (level 4) C4263](../../error-messages/compiler-warnings/compiler-warning-level-4-c4263.md)|'*function*': member function does not override any base class virtual member function| -|[Compiler warning (level 1) C4264](../../error-messages/compiler-warnings/compiler-warning-level-1-c4264.md)|'*virtual_function*': no override available for virtual member function from base '*classname*'; function is hidden| -|[Compiler warning (level 3) C4265](../../error-messages/compiler-warnings/compiler-warning-level-3-c4265.md)|'*classname*': class has virtual functions, but destructor is not virtual\n instances of this class may not be destructed correctly| -|[Compiler warning (level 4) C4266](../../error-messages/compiler-warnings/compiler-warning-level-4-c4266.md)|'*virtual_function*': no override available for virtual member function from base '*classname*'; function is hidden| -|[Compiler warning (level 3) C4267](../../error-messages/compiler-warnings/compiler-warning-level-3-c4267.md)|'*variable*': conversion from 'size_t' to '*type*', possible loss of data| -|[Compiler warning (level 4) C4268](../../error-messages/compiler-warnings/compiler-warning-level-4-c4268.md)|'*identifier*': 'const' static/global data initialized with compiler generated default constructor fills the object with zeros| -|[Compiler warning (level 1) C4269](../../error-messages/compiler-warnings/compiler-warning-level-1-c4269.md)|'*identifier*': 'const' automatic data initialized with compiler generated default constructor produces unreliable results| -|[Compiler warning (level 1) C4272](../../error-messages/compiler-warnings/compiler-warning-level-1-c4272.md)|'*function*': is marked __declspec(dllimport); must specify native calling convention when importing a function.| -|[Compiler warning (level 1) C4273](../../error-messages/compiler-warnings/compiler-warning-level-1-c4273.md)|'*function*': inconsistent dll linkage| +|[Compiler warning (level 4) C4204](compiler-warning-level-4-c4204.md)|nonstandard extension used: non-constant aggregate initializer| +|[Compiler warning (level 4) C4205](compiler-warning-level-4-c4205.md)|nonstandard extension used: static function declaration in function scope| +|[Compiler warning (level 4) C4206](compiler-warning-level-4-c4206.md)|nonstandard extension used: translation unit is empty| +|[Compiler warning (level 4) C4207](compiler-warning-level-4-c4207.md)|nonstandard extension used: extended initializer form| +|[Compiler warning (level 4) C4208](compiler-warning-level-4-c4208.md)|nonstandard extension used: delete [exp] - exp evaluated but ignored| +|[Compiler warning (level 4) C4210](compiler-warning-level-4-c4210.md)|nonstandard extension used: function given file scope| +|[Compiler warning (level 4) C4211](compiler-warning-level-4-c4211.md)|nonstandard extension used: redefined extern to static| +|[Compiler warning (level 4) C4212](compiler-warning-level-4-c4212.md)|nonstandard extension used: function declaration used ellipsis| +|[Compiler warning (level 4) C4213](compiler-warning-level-4-c4213.md)|nonstandard extension used: cast on l-value| +|[Compiler warning (level 4) C4214](compiler-warning-level-4-c4214.md)|nonstandard extension used: bit field types other than int| +|[Compiler warning (level 1) C4215](compiler-warning-level-1-c4215.md)|nonstandard extension used: long float| +|[Compiler warning (level 1) C4216](compiler-warning-level-1-c4216.md)|nonstandard extension used: float long| +|[Compiler warning (level 1) C4218](compiler-warning-level-1-c4218.md)|nonstandard extension used: must specify at least a storage class or a type| +|[Compiler warning (level 4) C4220](compiler-warning-level-4-c4220.md)|varargs matches remaining parameters| +|[Compiler warning (level 4) C4221](compiler-warning-level-4-c4221.md)|nonstandard extension used: '*identifier*': cannot be initialized using address of automatic variable '*variable*'| +|[Compiler warning (levels 1 and 4) C4223](compiler-warning-levels-1-and-4-c4223.md)|nonstandard extension used: non-lvalue array converted to pointer| +|[Compiler warning (level 1) C4224](compiler-warning-level-1-c4224.md)|nonstandard extension used: formal parameter '*identifier*' was previously defined as a type| +|[Compiler warning (level 1, Error) C4226](compiler-warning-level-1-c4226.md)|nonstandard extension used: '*keyword*' is an obsolete keyword| +|[Compiler warning (level 1) C4227](compiler-warning-level-1-c4227.md)|anachronism used: qualifiers on reference are ignored| +|[Compiler warning (level 1) C4228](compiler-warning-level-1-c4228.md)|nonstandard extension used: qualifiers after comma in declarator list are ignored| +|[Compiler warning (level 1) C4229](compiler-warning-level-1-c4229.md)|anachronism used: modifiers on data are ignored| +|[Compiler warning (level 1) C4230](compiler-warning-level-1-c4230.md)|anachronism used: modifiers/qualifiers interspersed; qualifier ignored| +|[Compiler warning (level 4) C4232](compiler-warning-level-4-c4232.md)|nonstandard extension used: '*identifier*': address of dllimport '*dllimport*' is not static, identity not guaranteed| +|[Compiler warning (level 4, Error) C4233](compiler-warning-level-4-c4233.md)|nonstandard extension used: '*keyword*' keyword only supported in C++, not C| +|[Compiler warning (level 4, Error) C4234](compiler-warning-level-4-c4234.md)|nonstandard extension used: '*keyword*' keyword reserved for future use| +|[Compiler warning (level 4, Error) C4235](compiler-warning-level-4-c4235.md)|nonstandard extension used: '*keyword*' keyword not supported on this architecture| +|[Compiler warning (level 1) C4237](compiler-warning-level-1-c4237.md)|'*keyword*' keyword is not yet supported, but reserved for future use| +|[Compiler warning (level 4) C4238](compiler-warning-level-4-c4238.md)|nonstandard extension used: class rvalue used as lvalue| +|[Compiler warning (level 4) C4239](compiler-warning-level-4-c4239.md)|nonstandard extension used: '*token*': conversion from '*type1*' to '*type2*'| +|[Compiler warning (level 3) C4240](compiler-warning-level-3-c4240.md)|nonstandard extension used: access to '*classname*' now defined to be '*access_specifier1*', previously it was defined to be '*access_specifier2*'| +|[Compiler warning (level 4) C4242](compiler-warning-level-4-c4242.md)|'*identifier*': conversion from '*type1*' to '*type2*', possible loss of data| +|[Compiler warning (level 3) C4243](compiler-warning-level-3-c4243.md)|'*conversion_type*' conversion from '*type1*' to '*type2*' exists, but is inaccessible| +|[Compiler warning (level 2) C4244](compiler-warning-level-2-c4244.md)|'*conversion_type*': conversion from '*type1*' to '*type2*', possible loss of data| +|[Compiler warning (levels 3 and 4) C4244](compiler-warning-levels-3-and-4-c4244.md)|'*conversion_type*': conversion from '*type1*' to '*type2*', possible loss of data| +|[Compiler warning (level 4) C4245](compiler-warning-level-4-c4245.md)|'*conversion_type*': conversion from '*type1*' to '*type2*', signed/unsigned mismatch| +|[Compiler warning (level 2) C4250](compiler-warning-level-2-c4250.md)|'*classname*': inherits '*base_classname*::*member*' via dominance| +|[Compiler warning (level 1) C4251](compiler-warning-level-1-c4251.md)|'*identifier*': '*object_type1*' '*identifier1*' needs to have dll-interface to be used by clients of '*object_type*' '*identfier2*'| +|[Compiler warning (level 4) C4254](compiler-warning-level-4-c4254.md)|'*operator*': conversion from '*type1*:*field_bits*' to '*type2*:*field_bits*', possible loss of data| +|[Compiler warning (level 4, off) C4255](compiler-warning-level-4-c4255.md)|'*function*': no function prototype given: converting '()' to '(void)'| +|[Compiler warning (level 4) C4256](compiler-warning-level-4-c4256.md)|'*function*': constructor for class with virtual bases has '...'; calls may not be compatible with older versions of Visual C++| +|[Compiler warning (level 1) C4258](compiler-warning-level-1-c4258.md)|'*variable*': definition from the for loop is ignored; the definition from the enclosing scope is used| +|[Compiler warning (level 4, off) C4263](compiler-warning-level-4-c4263.md)|'*function*': member function does not override any base class virtual member function| +|[Compiler warning (level 4, off) C4264](compiler-warning-level-1-c4264.md)|'*virtual_function*': no override available for virtual member function from base '*classname*'; function is hidden| +|[Compiler warning (level 3, off) C4265](compiler-warning-level-3-c4265.md)|'*classname*': class has virtual functions, but destructor is not virtual\n instances of this class may not be destructed correctly| +|[Compiler warning (level 4, off) C4266](compiler-warning-level-4-c4266.md)|'*virtual_function*': no override available for virtual member function from base '*classname*'; function is hidden| +|[Compiler warning (level 3) C4267](compiler-warning-level-3-c4267.md)|'*variable*': conversion from 'size_t' to '*type*', possible loss of data| +|[Compiler warning (level 4) C4268](compiler-warning-level-4-c4268.md)|'*identifier*': 'const' static/global data initialized with compiler generated default constructor fills the object with zeros| +|[Compiler warning (level 1) C4269](compiler-warning-level-1-c4269.md)|'*identifier*': 'const' automatic data initialized with compiler generated default constructor produces unreliable results| +|[Compiler warning (level 1) C4272](compiler-warning-level-1-c4272.md)|'*function*': is marked __declspec(dllimport); must specify native calling convention when importing a function.| +|[Compiler warning (level 1) C4273](compiler-warning-level-1-c4273.md)|'*function*': inconsistent dll linkage| |[Compiler warning (level 1) C4274](compiler-warning-level-1-c4274.md)|#ident ignored; see documentation for #pragma comment(exestr, 'string')| -|[Compiler warning (level 2) C4275](../../error-messages/compiler-warnings/compiler-warning-level-2-c4275.md)|non dll-interface '*classkey*' '*identifier1*' used as base for dll-interface '*classkey*' '*identifier2*'| -|[Compiler warning (level 1) C4276](../../error-messages/compiler-warnings/compiler-warning-level-1-c4276.md)|'*function*': no prototype provided; assumed no parameters| +|[Compiler warning (level 2) C4275](compiler-warning-level-2-c4275.md)|non dll-interface '*classkey*' '*identifier1*' used as base for dll-interface '*classkey*' '*identifier2*'| +|[Compiler warning (level 1) C4276](compiler-warning-level-1-c4276.md)|'*function*': no prototype provided; assumed no parameters| |Compiler warning (level 1) C4277|imported item '*classname*::*member*' exists as both data member and function member; data member ignored| -|[Compiler warning (level 3) C4278](../../error-messages/compiler-warnings/compiler-warning-level-3-c4278.md)|'*identifier*': identifier in type library '*library*' is already a macro; use the 'rename' qualifier| +|[Compiler warning (level 3 and level 4) C4278](compiler-warning-level-3-c4278.md)|'*identifier*': identifier in type library '*library*' is already a macro; use the 'rename' qualifier| |Compiler warning (level 3 and level 4) C4279|'*identifier*': identifier in type library '*library*' is a keyword; use the 'rename' qualifier| -|[Compiler warning (level 3) C4280](../../error-messages/compiler-warnings/compiler-warning-level-3-c4280.md)|'operator ->' was self recursive through type '*type*'| -|[Compiler warning (level 3) C4281](../../error-messages/compiler-warnings/compiler-warning-level-3-c4281.md)|'operator ->' recursion occurred through type '*type1*'| -|[Compiler warning (level 3) C4282](../../error-messages/compiler-warnings/compiler-warning-level-3-c4282.md)|then through type '*type2*'| -|[Compiler warning (level 3) C4283](../../error-messages/compiler-warnings/compiler-warning-level-3-c4283.md)|and through type '*typeN*'| -|[Compiler warning (level 2) C4285](../../error-messages/compiler-warnings/compiler-warning-level-2-c4285.md)|return type for '*identifier*::operator ->' is recursive if applied using infix notation| -|[Compiler warning (level 1) C4286](../../error-messages/compiler-warnings/compiler-warning-level-1-c4286.md)|'*derived_type*': is caught by base class ('*base_type*') on line '*line_number*'| -|[Compiler warning (level 3) C4287](../../error-messages/compiler-warnings/compiler-warning-level-3-c4287.md)|'*operator*': unsigned/negative constant mismatch| -|[Compiler warning (level 1) C4288](../../error-messages/compiler-warnings/compiler-warning-level-1-c4288.md)|nonstandard extension used: '*variable*': loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope| -|[Compiler warning (level 4) C4289](../../error-messages/compiler-warnings/compiler-warning-level-4-c4289.md)|nonstandard extension used: '*variable*': loop control variable declared in the for-loop is used outside the for-loop scope| -|[Compiler warning (level 3) C4290](../../error-messages/compiler-warnings/compiler-warning-level-3-c4290.md)|C++ exception specification ignored except to indicate a function is not __declspec(nothrow)| -|[Compiler warning (level 1) C4291](../../error-messages/compiler-warnings/compiler-warning-level-1-c4291.md)|'*declaration*': no matching operator delete found; memory will not be freed if initialization throws an exception| -|[Compiler warning (level 1) C4293](../../error-messages/compiler-warnings/compiler-warning-level-1-c4293.md)|'*shift_operator*': shift count negative or too big, undefined behavior| -|[Compiler warning (level 4) C4295](../../error-messages/compiler-warnings/compiler-warning-level-4-c4295.md)|'*array*': array is too small to include a terminating null character| -|[Compiler warning (level 4) C4296](../../error-messages/compiler-warnings/compiler-warning-level-4-c4296.md)|'*operator*': expression is always '*boolean_value*'| -|[Compiler warning (level 1) C4297](../../error-messages/compiler-warnings/compiler-warning-level-1-c4297.md)|'*function*': function assumed not to throw an exception but does| +|[Compiler warning (level 3) C4280](compiler-warning-level-3-c4280.md)|'operator ->' was self recursive through type '*type*'| +|[Compiler warning (level 3) C4281](compiler-warning-level-3-c4281.md)|'operator ->' recursion occurred through type '*type1*'| +|[Compiler warning (level 3) C4282](compiler-warning-level-3-c4282.md)|then through type '*type2*'| +|[Compiler warning (level 3) C4283](compiler-warning-level-3-c4283.md)|and through type '*typeN*'| +|[Compiler warning (level 2) C4285](compiler-warning-level-2-c4285.md)|return type for '*identifier*::operator ->' is recursive if applied using infix notation| +|[Compiler warning (level 1) C4286](compiler-warning-level-1-c4286.md)|'*derived_type*': is caught by base class ('*base_type*') on line '*line_number*'| +|[Compiler warning (level 3, off) C4287](compiler-warning-level-3-c4287.md)|'*operator*': unsigned/negative constant mismatch| +|[Compiler warning (level 1) C4288](compiler-warning-level-1-c4288.md)|nonstandard extension used: '*variable*': loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope| +|[Compiler warning (level 4, off) C4289](compiler-warning-level-4-c4289.md)|nonstandard extension used: '*variable*': loop control variable declared in the for-loop is used outside the for-loop scope| +|[Compiler warning (level 3) C4290](compiler-warning-level-3-c4290.md)|C++ exception specification ignored except to indicate a function is not __declspec(nothrow)| +|[Compiler warning (level 1) C4291](compiler-warning-level-1-c4291.md)|'*declaration*': no matching operator delete found; memory will not be freed if initialization throws an exception| +|[Compiler warning (level 1) C4293](compiler-warning-level-1-c4293.md)|'*shift_operator*': shift count negative or too big, undefined behavior| +|[Compiler warning (level 4) C4295](compiler-warning-level-4-c4295.md)|'*array*': array is too small to include a terminating null character| +|[Compiler warning (level 4, off) C4296](compiler-warning-level-4-c4296.md)|'*operator*': expression is always '*boolean_value*'| +|[Compiler warning (level 1) C4297](compiler-warning-level-1-c4297.md)|'*function*': function assumed not to throw an exception but does| |Compiler warning (level 4) C4298|'*identifier*': identifier in type library '*library*' is already a macro; renaming to '*__identifier*'| |Compiler warning (level 4) C4299|'*identifier*': identifier in type library '*library*' is a keyword; renaming to '*__identifier*'| |Compiler warning C4301|'*derived_class*::*function*': overriding virtual function only differs from '*base_class*::*function*' by const/volatile qualifier| -|[Compiler warning (level 2) C4302](../../error-messages/compiler-warnings/compiler-warning-level-2-c4302.md)|'*conversion*': truncation from '*type1*' to '*type2*'| +|[Compiler warning (level 2) C4302](compiler-warning-level-2-c4302.md)|'*conversion*': truncation from '*type1*' to '*type2*'| |Compiler warning C4303|C-style cast from '*type1*' to '*type2*' is deprecated, use static\_cast, \_\_try\_cast or dynamic\_cast| -|[Compiler warning (level 1) C4305](../../error-messages/compiler-warnings/compiler-warning-level-1-c4305.md)|'*conversion*': truncation from '*type1*' to '*type2*'| -|[Compiler warning (level 3) C4306](../../error-messages/compiler-warnings/compiler-warning-level-3-c4306.md)|'*conversion*': conversion from '*type1*' to '*type2*' of greater size| -|[Compiler warning (level 2) C4307](../../error-messages/compiler-warnings/compiler-warning-level-2-c4307.md)|'*operator*': integral constant overflow| -|[Compiler warning (level 2) C4308](../../error-messages/compiler-warnings/compiler-warning-level-2-c4308.md)|negative integral constant converted to unsigned type| -|[Compiler warning (level 2) C4309](../../error-messages/compiler-warnings/compiler-warning-level-2-c4309.md)|'*conversion*': truncation of constant value| -|[Compiler warning (level 3) C4310](../../error-messages/compiler-warnings/compiler-warning-level-3-c4310.md)|cast truncates constant value| -|[Compiler warning (level 1) C4311](../../error-messages/compiler-warnings/compiler-warning-level-1-c4311.md)|'*variable*': pointer truncation from '*type1*' to '*type2*'| -|[Compiler warning (level 1) C4312](../../error-messages/compiler-warnings/compiler-warning-level-1-c4312.md)|'*operation*': conversion from '*type1*' to '*type2*' of greater size| -|[Compiler warning (level 1) C4313](../../error-messages/compiler-warnings/compiler-warning-level-1-c4313.md)|'*function*': '*format_specifier*' in format string conflicts with argument '*argument_number*' of type '*type*'| +|[Compiler warning (level 1) C4305](compiler-warning-level-1-c4305.md)|'*conversion*': truncation from '*type1*' to '*type2*'| +|[Compiler warning (level 3) C4306](compiler-warning-level-3-c4306.md)|'*conversion*': conversion from '*type1*' to '*type2*' of greater size| +|[Compiler warning (level 2) C4307](compiler-warning-level-2-c4307.md)|'*operator*': integral constant overflow| +|[Compiler warning (level 2) C4308](compiler-warning-level-2-c4308.md)|negative integral constant converted to unsigned type| +|[Compiler warning (level 2) C4309](compiler-warning-level-2-c4309.md)|'*conversion*': truncation of constant value| +|[Compiler warning (level 3) C4310](compiler-warning-level-3-c4310.md)|cast truncates constant value| +|[Compiler warning (level 1) C4311](compiler-warning-level-1-c4311.md)|'*variable*': pointer truncation from '*type1*' to '*type2*'| +|[Compiler warning (level 1) C4312](compiler-warning-level-1-c4312.md)|'*operation*': conversion from '*type1*' to '*type2*' of greater size| +|[Compiler warning (level 1) C4313](compiler-warning-level-1-c4313.md)|'*function*': '*format_specifier*' in format string conflicts with argument '*argument_number*' of type '*type*'| |Compiler warning C4314|expected pragma parameter to be '32' or '64'| |Compiler warning (level 4) C4315|'*classname*': 'this' pointer for member '*member*' may not be aligned '*alignment*' as expected by the constructor| |[Compiler warning (level 3) C4316](compiler-warning-level-3-c4316.md)|'*identifier*': object allocated on the heap may not be aligned '*alignment*'| |Compiler warning (level 1) C4317|'*printf_family*' : not enough arguments passed for format string| |Compiler warning C4318|passing constant zero as the length to memset| -|[Compiler warning (level 1) C4319](../../error-messages/compiler-warnings/compiler-warning-level-1-c4319.md)|'*operator*': zero extending '*type1*' to '*type2*' of greater size| +|[Compiler warning (level 1) C4319](compiler-warning-level-1-c4319.md)|'*operator*': zero extending '*type1*' to '*type2*' of greater size| |Compiler warning (level 1) C4321|automatically generating an IID for interface '*interface*'| |Compiler warning (level 1) C4322|automatically generating a CLSID for class '*class*'| |Compiler warning (level 1) C4323|re-using registered CLSID for class '*class*'| -|[Compiler warning (level 4) C4324](../../error-messages/compiler-warnings/compiler-warning-level-4-c4324.md)|'*structname*': structure was padded due to __declspec(align())| -|[Compiler warning (level 1) C4325](../../error-messages/compiler-warnings/compiler-warning-level-1-c4325.md)|attributes for standard section '*section*' ignored| -|[Compiler warning (level 1) C4326](../../error-messages/compiler-warnings/compiler-warning-level-1-c4326.md)|return type of '*function*' should be '*type1*' instead of '*type2*'| +|[Compiler warning (level 4) C4324](compiler-warning-level-4-c4324.md)|'*structname*': structure was padded due to __declspec(align())| +|[Compiler warning (level 1) C4325](compiler-warning-level-1-c4325.md)|attributes for standard section '*section*' ignored| +|[Compiler warning (level 1) C4326](compiler-warning-level-1-c4326.md)|return type of '*function*' should be '*type1*' instead of '*type2*'| |Compiler warning C4327|'*assignment*': indirection alignment of LHS ('*alignment1*') is greater than RHS ('*alignment2*')| |Compiler warning C4328|'*function*': indirection alignment of formal parameter *parameter_number* (*parameter_alignment*) is greater than the actual argument alignment (*argument_alignment*)| -|[Compiler warning (level 1) C4329](../../error-messages/compiler-warnings/compiler-warning-level-1-c4329.md)|__declspec(align()) is ignored on enum| +|[Compiler warning (level 1) C4329](compiler-warning-level-1-c4329.md)|__declspec(align()) is ignored on enum| |Compiler warning (level 1) C4330|attribute '*attribute*' for section '*section*' ignored| -|[Compiler warning (level 1) C4333](../../error-messages/compiler-warnings/compiler-warning-level-1-c4333.md)|'*shift_operator*': right shift by too large amount, data loss| -|[Compiler warning (level 3) C4334](../../error-messages/compiler-warnings/compiler-warning-level-3-c4334.md)|'*shift_operator*': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)| -|[Compiler warning C4335](../../error-messages/compiler-warnings/compiler-warning-c4335.md)|Mac file format detected: please convert the source file to either DOS or UNIX format| -|[Compiler warning (level 4) C4336](../../error-messages/compiler-warnings/compiler-warning-level-4-c4336.md)|import cross-referenced type library '*library1*' before importing '*library2*'| -|[Compiler warning (level 4) C4337](../../error-messages/compiler-warnings/compiler-warning-level-4-c4337.md)|cross-referenced type library '*library1*' in '*library2*' is being automatically imported| +|[Compiler warning (level 1) C4333](compiler-warning-level-1-c4333.md)|'*shift_operator*': right shift by too large amount, data loss| +|[Compiler warning (level 3) C4334](compiler-warning-level-3-c4334.md)|'*shift_operator*': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)| +|[Compiler warning (level 1) C4335](compiler-warning-c4335.md)|Mac file format detected: please convert the source file to either DOS or UNIX format| +|[Compiler warning (level 4) C4336](compiler-warning-level-4-c4336.md)|import cross-referenced type library '*library1*' before importing '*library2*'| +|[Compiler warning (level 4) C4337](compiler-warning-level-4-c4337.md)|cross-referenced type library '*library1*' in '*library2*' is being automatically imported| |Compiler warning (level 4) C4338|#pragma *directive*: standard section '*section*' is used| -|[Compiler warning (level 4) C4339](../../error-messages/compiler-warnings/compiler-warning-level-4-c4339.md)|'*type*': use of undefined type detected in 'WinRT\|CLR' meta-data - use of this type may lead to a runtime exception| -|[Compiler warning (level 1) C4340](../../error-messages/compiler-warnings/compiler-warning-level-1-c4340.md)|'*value*': value wrapped from positive to negative value| -|[Compiler warning (level 1) C4342](../../error-messages/compiler-warnings/compiler-warning-level-1-c4342.md)|behavior change: '*function*' called, but a member operator was called in previous versions| +|[Compiler warning (level 4, off) C4339](compiler-warning-level-4-c4339.md)|'*type*': use of undefined type detected in 'WinRT\|CLR' meta-data - use of this type may lead to a runtime exception| +|[Compiler warning (level 1) C4340](compiler-warning-level-1-c4340.md)|'*value*': value wrapped from positive to negative value| +|[Compiler warning (level 1, off, no longer emitted) C4342](compiler-warning-level-1-c4342.md)|behavior change: '*function*' called, but a member operator was called in previous versions| |[Compiler warning (level 4) C4343](compiler-warning-level-4-c4343.md)|#pragma optimize("g",off) overrides /Og option| -|[Compiler warning (level 1) C4344](../../error-messages/compiler-warnings/compiler-warning-level-1-c4344.md)|behavior change: use of explicit template arguments results in call to '*function*'| -|[Compiler warning (level 1) C4346](../../error-messages/compiler-warnings/compiler-warning-level-1-c4346.md)|'*name*': dependent name is not a type| -|[Compiler warning (level 1) C4348](../../error-messages/compiler-warnings/compiler-warning-level-1-c4348.md)|'*type*': redefinition of default parameter: parameter '*parameter_number*'| -|[Compiler warning (level 1) C4350](../../error-messages/compiler-warnings/compiler-warning-level-1-c4350.md)|behavior change: '*member1*' called instead of '*member2*'| +|[Compiler warning (level 1) C4344](compiler-warning-level-1-c4344.md)|behavior change: use of explicit template arguments results in call to '*function*'| +|[Compiler warning (level 1) C4346](compiler-warning-level-1-c4346.md)|'*name*': dependent name is not a type| +|[Compiler warning (level 1) C4348](compiler-warning-level-1-c4348.md)|'*type*': redefinition of default parameter: parameter '*parameter_number*'| +|[Compiler warning (level 1, off, no longer emitted) C4350](compiler-warning-level-1-c4350.md)|behavior change: '*member1*' called instead of '*member2*'| |Compiler warning (level 1) C4352|'*identifier*': intrinsic function already defined| -|[Compiler warning (level 1) C4353](../../error-messages/compiler-warnings/compiler-warning-level-1-c4353.md)|nonstandard extension used: constant 0 as function expression. Use '__noop' function intrinsic instead| -|[Compiler warning C4355](../../error-messages/compiler-warnings/compiler-warning-c4355.md)Compiler warning (level 1 and level 4) C4355|'this': used in base member initializer list| -|[Compiler warning (level 2) C4356](../../error-messages/compiler-warnings/compiler-warning-level-2-c4356.md)|'*member*': static data member cannot be initialized via derived class| -|[Compiler warning (level 3) C4357](../../error-messages/compiler-warnings/compiler-warning-level-3-c4357.md)|param array argument found in formal argument list for delegate '*delegate*' ignored when generating '*function*'| -|[Compiler warning (level 1) C4358](../../error-messages/compiler-warnings/compiler-warning-level-1-c4358.md)|'*operator*': return type of combined delegates is not 'void'; returned value is undefined| -|[Compiler warning (level 3) C4359](../../error-messages/compiler-warnings/compiler-warning-level-3-c4359.md)|'*type*': Alignment specifier is less than actual alignment ('*alignment*'), and will be ignored.| +|[Compiler warning (level 1) C4353](compiler-warning-level-1-c4353.md)|nonstandard extension used: constant 0 as function expression. Use '__noop' function intrinsic instead| +|[Compiler warning C4355](compiler-warning-c4355.md)Compiler warning (level 1 and level 4) C4355|'this': used in base member initializer list| +|[Compiler warning (level 2) C4356](compiler-warning-level-2-c4356.md)|'*member*': static data member cannot be initialized via derived class| +|[Compiler warning (level 3) C4357](compiler-warning-level-3-c4357.md)|param array argument found in formal argument list for delegate '*delegate*' ignored when generating '*function*'| +|[Compiler warning (level 1) C4358](compiler-warning-level-1-c4358.md)|'*operator*': return type of combined delegates is not 'void'; returned value is undefined| +|[Compiler warning (level 1 and level 3) C4359](compiler-warning-level-3-c4359.md)|'*type*': Alignment specifier is less than actual alignment ('*alignment*'), and will be ignored.| |Compiler warning (level 2) C4362|'*type*': alignment greater than 8 bytes is not supported by CLR| -|[Compiler warning (level 1) C4364](../../error-messages/compiler-warnings/compiler-warning-level-1-c4364.md)|#using for assembly '*assembly*' previously seen at '*location*'('*line_number*') without as\_friend attribute; as\_friend not applied| -|[Compiler warning (level 4) C4365](../../error-messages/compiler-warnings/compiler-warning-level-4-c4365.md)|'*expression*': conversion from '*type1*' to '*type2*', signed/unsigned mismatch| -|[Compiler warning (level 4) C4366](../../error-messages/compiler-warnings/compiler-warning-level-4-c4366.md)|The result of the unary '*operator*' operator may be unaligned| +|[Compiler warning (level 1) C4364](compiler-warning-level-1-c4364.md)|#using for assembly '*assembly*' previously seen at '*location*'('*line_number*') without as\_friend attribute; as\_friend not applied| +|[Compiler warning (level 4, off) C4365](compiler-warning-level-4-c4365.md)|'*expression*': conversion from '*type1*' to '*type2*', signed/unsigned mismatch| +|[Compiler warning (level 4) C4366](compiler-warning-level-4-c4366.md)|The result of the unary '*operator*' operator may be unaligned| |Compiler warning (level 3) C4367|Conversion from '*type1*' to '*type2*' may cause datatype misalignment exception| -|[Compiler warning (Error) C4368](../../error-messages/compiler-warnings/compiler-warning-c4368.md)|cannot define '*member*' as a member of managed '*type*': mixed types are not supported| -|[Compiler warning (level 1) C4369](../../error-messages/compiler-warnings/compiler-warning-level-1-c4369.md)|'*enumerator*': enumerator value '*value*' cannot be represented as '*type*', value is '*new_value*'| +|[Compiler warning (level 1, Error) C4368](compiler-warning-c4368.md)|cannot define '*member*' as a member of managed '*type*': mixed types are not supported| +|[Compiler warning (level 1) C4369](compiler-warning-level-1-c4369.md)|'*enumerator*': enumerator value '*value*' cannot be represented as '*type*', value is '*new_value*'| |Compiler warning C4370|'*classname*': layout of class has changed from a previous version of the compiler due to better packing| -|[Compiler warning (level 3) C4371](../../error-messages/compiler-warnings/c4371.md)|'*classname*': layout of class may have changed from a previous version of the compiler due to better packing of member '*member*'| -|[Compiler warning (level 3) C4373](compiler-warning-level-3-c4373.md)|'*derived_class*::*function*': virtual function overrides '*base_class*::*function*', previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers| -|[Compiler warning (level 1) C4374](../../error-messages/compiler-warnings/compiler-warning-level-1-c4374.md)|'*function1*': interface method will not be implemented by non-virtual method '*function2*'| -|[Compiler warning (level 1) C4375](../../error-messages/compiler-warnings/compiler-warning-level-1-c4375.md)|non-public method '*method2*' does not override '*method2*'| -|[Compiler warning (level 1) C4376](../../error-messages/compiler-warnings/compiler-warning-level-1-c4376.md)|access specifier '*old_specifier*:' is no longer supported: please use '*new_specifier*:' instead| -|[Compiler warning (level 1) C4377](../../error-messages/compiler-warnings/compiler-warning-level-1-c4377.md)|native types are private by default; -d1PrivateNativeTypes is deprecated| -|[Compiler warning (level 1) C4378](../../error-messages/compiler-warnings/compiler-warning-level-1-c4378.md)|Must obtain function pointers to run initializers; consider System::ModuleHandle::ResolveMethodHandle| -|[Compiler warning (level 1) C4379](../../error-messages/compiler-warnings/compiler-warning-level-1-c4379.md)|Version '*version_number*' of the common language runtime is not supported by this compiler. Using this version may cause unexpected results| +|[Compiler warning (level 3, off) C4371](c4371.md)|'*classname*': layout of class may have changed from a previous version of the compiler due to better packing of member '*member*'| +|[Compiler warning (level 4) C4373](compiler-warning-level-3-c4373.md)|'*derived_class*::*function*': virtual function overrides '*base_class*::*function*', previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers| +|[Compiler warning (level 1) C4374](compiler-warning-level-1-c4374.md)|'*function1*': interface method will not be implemented by non-virtual method '*function2*'| +|[Compiler warning (level 1) C4375](compiler-warning-level-1-c4375.md)|non-public method '*method2*' does not override '*method2*'| +|[Compiler warning (level 1) C4376](compiler-warning-level-1-c4376.md)|access specifier '*old_specifier*:' is no longer supported: please use '*new_specifier*:' instead| +|[Compiler warning (level 1) C4377](compiler-warning-level-1-c4377.md)|native types are private by default; -d1PrivateNativeTypes is deprecated| +|[Compiler warning (level 1) C4378](compiler-warning-level-1-c4378.md)|Must obtain function pointers to run initializers; consider System::ModuleHandle::ResolveMethodHandle| +|[Compiler warning (level 1) C4379](compiler-warning-level-1-c4379.md)|Version '*version_number*' of the common language runtime is not supported by this compiler. Using this version may cause unexpected results| |Compiler warning (level 1, Error) C4380|'*class*': A default constructor cannot be deprecated| -|[Compiler warning (level 1) C4381](../../error-messages/compiler-warnings/compiler-warning-level-1-c4381.md)|'*function1*': interface method will not be implemented by non-public method '*function2*'| -|[Compiler warning (level 1) C4382](../../error-messages/compiler-warnings/compiler-warning-level-1-c4382.md)|throwing '*type*': a type with __clrcall destructor or copy constructor can only be caught in /clr:pure module| -|[Compiler warning (level 1) C4383](../../error-messages/compiler-warnings/compiler-warning-level-1-c4383.md)|'*instance_dereference_operator*': the meaning of dereferencing a handle can change, when a user-defined '*instance_dereference_operator*' operator exists; write the operator as a static function to be explicit about the operand| -|[Compiler warning (level 1) C4384](../../error-messages/compiler-warnings/compiler-warning-level-1-c4384.md)|#pragma 'make_public' should only be used at global scope| +|[Compiler warning (level 1) C4381](compiler-warning-level-1-c4381.md)|'*function1*': interface method will not be implemented by non-public method '*function2*'| +|[Compiler warning (level 1) C4382](compiler-warning-level-1-c4382.md)|throwing '*type*': a type with __clrcall destructor or copy constructor can only be caught in /clr:pure module| +|[Compiler warning (level 1) C4383](compiler-warning-level-1-c4383.md)|'*instance_dereference_operator*': the meaning of dereferencing a handle can change, when a user-defined '*instance_dereference_operator*' operator exists; write the operator as a static function to be explicit about the operand| +|[Compiler warning (level 1) C4384](compiler-warning-level-1-c4384.md)|#pragma 'make_public' should only be used at global scope| |Compiler warning (level 3) C4387|'*alternative*': was considered| -|[Compiler warning (level 4) C4388](./c4388.md))|'*expression*': signed/unsigned mismatch| -|[Compiler warning (level 4) C4389](../../error-messages/compiler-warnings/compiler-warning-level-4-c4389.md)|'*operator*': signed/unsigned mismatch| -|[Compiler warning (level 3) C4390](../../error-messages/compiler-warnings/compiler-warning-level-3-c4390.md)|';': empty controlled statement found; is this the intent?| -|[Compiler warning (level 1) C4391](../../error-messages/compiler-warnings/compiler-warning-level-1-c4391.md)|'*function_signature*': incorrect return type for intrinsic function, expected '*type*'| -|[Compiler warning (level 1) C4392](../../error-messages/compiler-warnings/compiler-warning-level-1-c4392.md)|'*function_signature*': incorrect number of arguments for intrinsic function, expected '*argument_count*' arguments| -|[Compiler warning (level 1) C4393](../../error-messages/compiler-warnings/compiler-warning-level-1-c4393.md)|'*variable*': const has no effect on '*literal*' data member; ignored| -|[Compiler warning C4394](../../error-messages/compiler-warnings/compiler-warning-c4394.md)|'*function*': per-appdomain symbol should not be marked with __declspec('dllexport')| -|[Compiler warning (level 1) C4395](../../error-messages/compiler-warnings/compiler-warning-level-1-c4395.md)|'*function*': member function will be invoked on a copy of the initonly data member '*member*'| +|[Compiler warning (level 4, off) C4388](./c4388.md))|'*expression*': signed/unsigned mismatch| +|[Compiler warning (level 4) C4389](compiler-warning-level-4-c4389.md)|'*operator*': signed/unsigned mismatch| +|[Compiler warning (level 3) C4390](compiler-warning-level-3-c4390.md)|';': empty controlled statement found; is this the intent?| +|[Compiler warning (level 1) C4391](compiler-warning-level-1-c4391.md)|'*function_signature*': incorrect return type for intrinsic function, expected '*type*'| +|[Compiler warning (level 1, Error) C4392](compiler-warning-level-1-c4392.md)|'*function_signature*': incorrect number of arguments for intrinsic function, expected '*argument_count*' arguments| +|[Compiler warning (level 1) C4393](compiler-warning-level-1-c4393.md)|'*variable*': const has no effect on '*literal*' data member; ignored| +|[Compiler warning (level 1, Error) C4394](compiler-warning-c4394.md)|'*function*': per-appdomain symbol should not be marked with __declspec('dllexport')| +|[Compiler warning (level 1) C4395](compiler-warning-level-1-c4395.md)|'*function*': member function will be invoked on a copy of the initonly data member '*member*'| |[Compiler warning (level 2) C4396](compiler-warning-level-2-c4396.md)|'*function*': the inline specifier cannot be used when a friend declaration refers to a specialization of a function template| -|[Compiler warning (level 1) C4397](../../error-messages/compiler-warnings/compiler-warning-level-1-c4397.md)|DefaultCharSetAttribute is ignored| -|[Compiler warning (level 3) C4398](../../error-messages/compiler-warnings/compiler-warning-level-3-c4398.md)|'*variable*': per-process global object might not work correctly with multiple appdomains; consider using __declspec(appdomain)| -|[Compiler warning (level 1) C4399](../../error-messages/compiler-warnings/compiler-warning-level-1-c4399.md)|'*symbol*': per-process symbol should not be marked with __declspec('dllimport') when compiled with /clr:pure| +|[Compiler warning (level 1) C4397](compiler-warning-level-1-c4397.md)|DefaultCharSetAttribute is ignored| +|[Compiler warning (level 3) C4398](compiler-warning-level-3-c4398.md)|'*variable*': per-process global object might not work correctly with multiple appdomains; consider using __declspec(appdomain)| +|[Compiler warning (level 1, Error) C4399](compiler-warning-level-1-c4399.md)|'*symbol*': per-process symbol should not be marked with __declspec('dllimport') when compiled with /clr:pure| ## See also diff --git a/docs/error-messages/toc.yml b/docs/error-messages/toc.yml index 3d8d366752a..d43a1252599 100644 --- a/docs/error-messages/toc.yml +++ b/docs/error-messages/toc.yml @@ -3534,19 +3534,19 @@ items: href: compiler-warnings/compiler-warning-level-1-c4251.md - name: Compiler warning (level 4) C4254 href: compiler-warnings/compiler-warning-level-4-c4254.md - - name: Compiler warning (level 4) C4255 + - name: Compiler warning (level 4, off) C4255 href: compiler-warnings/compiler-warning-level-4-c4255.md - name: Compiler warning (level 4) C4256 href: compiler-warnings/compiler-warning-level-4-c4256.md - name: Compiler warning (level 1) C4258 href: compiler-warnings/compiler-warning-level-1-c4258.md - - name: Compiler warning (level 4) C4263 + - name: Compiler warning (level 4, off) C4263 href: compiler-warnings/compiler-warning-level-4-c4263.md - - name: Compiler warning (level 1) C4264 + - name: Compiler warning (level 4, off) C4264 href: compiler-warnings/compiler-warning-level-1-c4264.md - - name: Compiler warning (level 3) C4265 + - name: Compiler warning (level 3, off) C4265 href: compiler-warnings/compiler-warning-level-3-c4265.md - - name: Compiler warning (level 4) C4266 + - name: Compiler warning (level 4, off) C4266 href: compiler-warnings/compiler-warning-level-4-c4266.md - name: Compiler warning (level 3) C4267 href: compiler-warnings/compiler-warning-level-3-c4267.md @@ -3564,7 +3564,7 @@ items: href: compiler-warnings/compiler-warning-level-2-c4275.md - name: Compiler warning (level 1) C4276 href: compiler-warnings/compiler-warning-level-1-c4276.md - - name: Compiler warning (level 3) C4278 + - name: Compiler warning (level 3 and level 4) C4278 href: compiler-warnings/compiler-warning-level-3-c4278.md - name: Compiler warning (level 3) C4280 href: compiler-warnings/compiler-warning-level-3-c4280.md @@ -3578,11 +3578,11 @@ items: href: compiler-warnings/compiler-warning-level-2-c4285.md - name: Compiler warning (level 1) C4286 href: compiler-warnings/compiler-warning-level-1-c4286.md - - name: Compiler warning (level 3) C4287 + - name: Compiler warning (level 3, off) C4287 href: compiler-warnings/compiler-warning-level-3-c4287.md - name: Compiler warning (level 1) C4288 href: compiler-warnings/compiler-warning-level-1-c4288.md - - name: Compiler warning (level 4) C4289 + - name: Compiler warning (level 4, off) C4289 href: compiler-warnings/compiler-warning-level-4-c4289.md - name: Compiler warning (level 3) C4290 href: compiler-warnings/compiler-warning-level-3-c4290.md @@ -3592,7 +3592,7 @@ items: href: compiler-warnings/compiler-warning-level-1-c4293.md - name: Compiler warning (level 4) C4295 href: compiler-warnings/compiler-warning-level-4-c4295.md - - name: Compiler warning (level 4) C4296 + - name: Compiler warning (level 4, off) C4296 href: compiler-warnings/compiler-warning-level-4-c4296.md - name: Compiler warning (level 1) C4297 href: compiler-warnings/compiler-warning-level-1-c4297.md @@ -3632,17 +3632,17 @@ items: href: compiler-warnings/compiler-warning-level-1-c4333.md - name: Compiler warning (level 3) C4334 href: compiler-warnings/compiler-warning-level-3-c4334.md - - name: Compiler warning C4335 + - name: Compiler warning (level 1) C4335 href: compiler-warnings/compiler-warning-c4335.md - name: Compiler warning (level 4) C4336 href: compiler-warnings/compiler-warning-level-4-c4336.md - name: Compiler warning (level 4) C4337 href: compiler-warnings/compiler-warning-level-4-c4337.md - - name: Compiler warning (level 4) C4339 + - name: Compiler warning (level 4, off) C4339 href: compiler-warnings/compiler-warning-level-4-c4339.md - name: Compiler warning (level 1) C4340 href: compiler-warnings/compiler-warning-level-1-c4340.md - - name: Compiler warning (level 1) C4342 + - name: Compiler warning (level 1, no longer emitted) C4342 href: compiler-warnings/compiler-warning-level-1-c4342.md - name: Compiler warning (level 4) C4343 href: compiler-warnings/compiler-warning-level-4-c4343.md @@ -3652,7 +3652,7 @@ items: href: compiler-warnings/compiler-warning-level-1-c4346.md - name: Compiler warning (level 1) C4348 href: compiler-warnings/compiler-warning-level-1-c4348.md - - name: Compiler warning (level 1) C4350 + - name: Compiler warning (level 1, no longer emitted) C4350 href: compiler-warnings/compiler-warning-level-1-c4350.md - name: Compiler warning (level 1) C4353 href: compiler-warnings/compiler-warning-level-1-c4353.md @@ -3664,21 +3664,21 @@ items: href: compiler-warnings/compiler-warning-level-3-c4357.md - name: Compiler warning (level 1) C4358 href: compiler-warnings/compiler-warning-level-1-c4358.md - - name: Compiler warning (level 3) C4359 + - name: Compiler warning (level 1 and level 3) C4359 href: compiler-warnings/compiler-warning-level-3-c4359.md - name: Compiler warning (level 1) C4364 href: compiler-warnings/compiler-warning-level-1-c4364.md - - name: Compiler warning (level 4) C4365 + - name: Compiler warning (level 4, off) C4365 href: compiler-warnings/compiler-warning-level-4-c4365.md - name: Compiler warning (level 4) C4366 href: compiler-warnings/compiler-warning-level-4-c4366.md - - name: Compiler warning C4368 + - name: Compiler warning (level 1, Error) C4368 href: compiler-warnings/compiler-warning-c4368.md - name: Compiler warning (level 1) C4369 href: compiler-warnings/compiler-warning-level-1-c4369.md - - name: Compiler warning (level 3) C4371 + - name: Compiler warning (level 3, off) C4371 href: compiler-warnings/c4371.md - - name: Compiler warning (level 3) C4373 + - name: Compiler warning (level 4) C4373 href: compiler-warnings/compiler-warning-level-3-c4373.md - name: Compiler warning (level 1) C4374 href: compiler-warnings/compiler-warning-level-1-c4374.md @@ -3700,7 +3700,7 @@ items: href: compiler-warnings/compiler-warning-level-1-c4383.md - name: Compiler warning (level 1) C4384 href: compiler-warnings/compiler-warning-level-1-c4384.md - - name: Compiler warning (level 4) C4388 + - name: Compiler warning (level 4, off) C4388 href: compiler-warnings/c4388.md - name: Compiler warning (level 4) C4389 href: compiler-warnings/compiler-warning-level-4-c4389.md @@ -3708,11 +3708,11 @@ items: href: compiler-warnings/compiler-warning-level-3-c4390.md - name: Compiler warning (level 1) C4391 href: compiler-warnings/compiler-warning-level-1-c4391.md - - name: Compiler warning (level 1) C4392 + - name: Compiler warning (level 1, Error) C4392 href: compiler-warnings/compiler-warning-level-1-c4392.md - name: Compiler warning (level 1) C4393 href: compiler-warnings/compiler-warning-level-1-c4393.md - - name: Compiler warning C4394 + - name: Compiler warning (level 1, Error) C4394 href: compiler-warnings/compiler-warning-c4394.md - name: Compiler warning (level 1) C4395 href: compiler-warnings/compiler-warning-level-1-c4395.md @@ -3722,7 +3722,7 @@ items: href: compiler-warnings/compiler-warning-level-1-c4397.md - name: Compiler warning (level 3) C4398 href: compiler-warnings/compiler-warning-level-3-c4398.md - - name: Compiler warning (level 1) C4399 + - name: Compiler warning (level 1, Error) C4399 href: compiler-warnings/compiler-warning-level-1-c4399.md - name: Compiler warnings C4400 Through C4599 expanded: false