Muokkaa

Jaa


Microsoft C/C++ compiler warnings C5000 through C5199

The articles in this section describe Microsoft C/C++ compiler warning messages C5000 through C5199.

Important

The Visual Studio compilers and build tools can report many kinds of errors and warnings. After an error or warning is found, the build tools may make assumptions about code intent and attempt to continue, so that more issues can be reported at the same time. If the tools make the wrong assumption, later errors or warnings may not apply to your project. When you correct issues in your project, always start with the first error or warning that's reported, and rebuild often. One fix may make many subsequent errors go away.

To get help on a particular diagnostic message in Visual Studio, select it in the Output window and press the F1 key. Visual Studio opens the documentation page for that error, if one exists. You can also use the search tool at the top of the page to find articles about specific errors or warnings. Or, browse the list of errors and warnings by tool and type in the table of contents on this page.

Note

Not every Visual Studio error or warning is documented. In many cases, the diagnostic message provides all of the information that's available. If you landed on this page when you used F1 and you think the error or warning message needs additional explanation, let us know. You can use the feedback buttons on this page to raise a documentation issue on GitHub. If you think the error or warning is wrong, or you've found another problem with the toolset, report a product issue on the Developer Community site. You can also send feedback and enter bugs within the IDE. In Visual Studio, go to the menu bar and choose Help > Send Feedback > Report a Problem, or submit a suggestion by using Help > Send Feedback > Send a Suggestion. Some compiler error topics were created that are not emitted by the compiler and now redirect to this page instead.

You may find additional assistance for errors and warnings in Microsoft Learn Q&A forums. Or, search for the error or warning number on the Visual Studio C++ Developer Community site. You can also search Stack Overflow to find solutions.

For links to additional help and community resources, see Visual C++ Help and Community.

Warning messages

Warning Message
Compiler warning C5022 'type': multiple move constructors specified
Compiler warning C5023 'type': multiple move assignment operators specified
Compiler warning (level 4, off) C5024 'type': move constructor was implicitly defined as deleted
Compiler warning (level 4, off) C5025 'type': move assignment operator was implicitly defined as deleted
Compiler warning (level 1 and level 4, off) C5026 'type': move constructor was implicitly defined as deleted
Compiler warning (level 1 and level 4, off) C5027 'type': move assignment operator was implicitly defined as deleted
Compiler warning (level 1) C5028 'name': Alignment specified in prior declaration (number) not specified in definition
Compiler warning (level 4, off) C5029 nonstandard extension used: alignment attributes in C++ apply to variables, data members and tag types only
Compiler warning (level 3) C5030 attribute 'attribute-name' is not recognized
Compiler warning (level 4, off) C5031 #pragma warning(pop): likely mismatch, popping warning state pushed in different file
Compiler warning (level 4, off) C5032 detected #pragma warning(push) with no corresponding #pragma warning(pop)
Compiler warning (level 1) C5033 'storage-class' is no longer a supported storage class
Compiler warning (level 5, off) C5034 use of intrinsic 'intrinsic' causes function function-name to be compiled as guest code
Compiler warning (level 5, off) C5035 use of feature 'feature' causes function function-name to be compiled as guest code
Compiler warning (level 1) C5036 varargs function pointer conversion when compiling with /hybrid:x86arm64 'type1' to 'type2'
Compiler warning (error) C5037 'member-function': an out-of-line definition of a member of a class template cannot have default arguments
Compiler warning (level 4, off) C5038 data member 'member1' will be initialized after data member 'member2'
Compiler warning (level 4, off) C5039 'function': pointer or reference to potentially throwing function passed to extern C function under -EHc. Undefined behavior may occur if this function throws an exception.
Compiler warning (level 3) C5040 dynamic exception specifications are valid only in C++14 and earlier; treating as noexcept(false)
Compiler warning (level 1, off) C5041 'definition': out-of-line definition for constexpr static data member is not needed and is deprecated in C++17
Compiler warning (level 3, off) C5042 'declaration': function declarations at block scope cannot be specified 'inline' in standard C++; remove 'inline' specifier
Compiler warning (level 2) C5043 'specification': exception specification does not match previous declaration
Compiler warning (level 4) C5044 An argument to command-line option option-name points to a path 'path-name' that does not exist
Compiler warning (level 4) C5045 Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified
Compiler warning (level 2) C5046 'function': Symbol involving type with internal linkage not defined
Compiler warning (level 1) C5047 use of nonstandard __if_exists with modules is not supported
Compiler warning (level 1) C5048 Use of macro 'macroname' may result in non-deterministic output
Compiler warning (level 1) C5049 'string': Embedding a full path may result in machine-dependent output
Compiler warning (level 1) C5050 Possible incompatible environment while importing module 'module_name': issue
Compiler warning (level 1) C5051 attribute 'attribute-name' requires at least 'standard-level'; ignored
Compiler warning (level 3, off) C5052 Keyword 'keyword-name' was introduced in C++<version> and requires use of the 'option-name' command-line option
Compiler warning (level 1) C5053 support for 'explicit(<expr>)' in C++17 and earlier is a vendor extension
Compiler warning (level 4) C5054 operator 'operator-name': deprecated between enumerations of different types
Compiler warning (level 1) C5055 operator 'operator-name': deprecated between enumerations and floating-point types
Compiler warning (level 1) C5056 operator 'operator-name': deprecated for array types
Compiler warning (level 1) C5057 header unit reference to 'name' already exists. Ignoring header unit 'header-name'
Compiler warning (level 1) C5058 file system error: cannot find header file 'file-name' for header unit 'unit-name'
Compiler warning C5059 runtime checks and address sanitizer is not currently supported - disabling runtime checks
Compiler warning (level 4) C5060 /Qpar and address sanitizer not currently supported - disabling auto-parallelization
Compiler warning (level 4) C5061 the use of a comma operator as a subscript expression has been deprecated
Compiler warning (level 4) C5062 enum direct list initialization between 'type-1' and 'type-2' is no longer supported
Compiler warning (level 1) C5063 'std::is_constant_evaluated' always evaluates to true in manifestly constant-evaluated expressions
Compiler warning (level 1) C5072 ASAN enabled without debug information emission. Enable debug info for better ASAN error reporting
Compiler warning (level 1) C5081 Secure hotpatch is not supported with /GENPROFILE, /FASTGENPROFILE or /LTCG:PGI, disabling secure hotpatch.
Compiler warning (level 1) C5100 __VA_ARGS__ is reserved for use in variadic macros
Compiler warning (level 1) C5101 use of preprocessor directive in function-like macro argument list is undefined behavior
Compiler warning (level 1) C5102 ignoring invalid command-line macro definition 'value'
Compiler warning (level 1) C5103 pasting 'token1' and 'token2' does not result in a valid preprocessing token
Compiler warning (level 1) C5104 found 'string1#string2' in macro replacement list, did you mean 'string1""#string2'?
Compiler warning (level 1) C5105 macro expansion producing 'defined' has undefined behavior
Compiler warning (level 1) C5106 macro redefined with different parameter names
Compiler warning (level 1) C5107 missing terminating 'char' character
Compiler warning (level 1) C5108 __VA_OPT__ is reserved for use in variadic macros
Compiler warning (level 1) C5109 __VA_OPT__ use in macro requires '/Zc:preprocessor'
Compiler warning (level 4, off) C5110 __VA_OPT__ is an extension prior to C++20 or C23

See also

C/C++ Compiler and build tools errors and warnings
Compiler warnings C4000 - C5999