Editare

Partajați prin


Microsoft C/C++ compiler warnings C4600 through C4799

The articles in this section describe Microsoft C/C++ compiler warning messages C4600 through C4799.

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 (level 1) C4600 #pragma 'macro name': expected a valid non-empty string
Compiler warning (level 1) C4602 #pragma pop_macro: 'macro name' no previous #pragma push_macro for this identifier
Compiler warning (level 1) C4603 'identifier': macro is not defined or definition is different after precompiled header use
Compiler warning (level 1) C4604 'type': passing argument by value across native and managed boundary requires valid copy constructor. Otherwise the runtime behavior is undefined
Compiler warning (level 1) C4605 '/Dmacro' specified on current command line, but was not specified when precompiled header was built
Compiler warning (level 1) C4606 #pragma warning: 'warning number' ignored; Code Analysis warnings are not associated with warning levels
Compiler warning (level 3) C4608 'union_member' has already been initialized by another union member in the initializer list, 'union_member'
Compiler warning (level 3, Error) C4609 'type1' derives from default interface 'interface' on type 'type2'. Use a different default interface for 'type1', or break the base/derived relationship.
Compiler warning (level 4) C4610 object 'class' can never be instantiated - user defined constructor required
Compiler warning (level 4) C4611 interaction between 'function' and C++ object destruction is non-portable
Compiler warning (level 1) C4612 error in include filename
Compiler warning (level 1) C4613 'symbol': class of segment cannot be changed
Compiler warning (level 1) C4615 #pragma warning: unknown user warning type
Compiler warning (level 1) C4616 #pragma warning: warning number 'number' not a valid compiler warning
Compiler warning (level 1) C4618 pragma parameters included an empty string; pragma ignored
Compiler warning (level 3) C4619 #pragma warning: there is no warning number 'number'
Compiler warning (level 1) C4620 no postfix form of 'operator ++' found for type 'type', using prefix form
Compiler warning (level 1) C4621 no postfix form of 'operator --' found for type 'type', using prefix form
Compiler warning (level 3) C4622 overwriting debug information formed during creation of the precompiled header in object file: 'file'
Compiler warning (level 4) C4623 'derived class': default constructor was implicitly defined as deleted because a base class default constructor is inaccessible or deleted
Compiler warning (level 1) C4624 'derived class': destructor was implicitly defined as deleted because a base class destructor is inaccessible or deleted
Compiler warning (level 4) C4625 'derived class': copy constructor was implicitly defined as deleted because a base class copy constructor is inaccessible or deleted
Compiler warning (level 4) C4626 'derived class': assignment operator was implicitly defined as deleted because a base class assignment operator is inaccessible or deleted
Compiler warning (level 1) C4627 '<identifier>': skipped when looking for precompiled header use
Compiler warning (level 1) C4628 digraphs not supported with -Ze. Character sequence 'digraph' not interpreted as alternate token for '%s'
Compiler warning (level 4) C4629 digraph used, character sequence 'digraph' interpreted as token 'char' (insert a space between the two characters if this is not what you intended)
Compiler warning (level 1) C4630 'symbol': 'extern' storage-class specifier illegal on member definition
Compiler warning (level 2) C4631 MSXML or XPath unavailable, XML document comments will not be processed. reason
Compiler warning (level 1) C4632 XML document comment: file - access denied: reason
Compiler warning (level 3) C4633 XML document comment target: error: reason
Compiler warning (level 4) C4634 XML document comment target: cannot be applied: reason
Compiler warning (level 3) C4635 XML document comment target: badly-formed XML: reason
Compiler warning (level 3) C4636 XML document comment applied to construct: tag requires non-empty 'attribute' attribute.
Compiler warning (level 3 and level 4) C4637 XML document comment target: <include> tag discarded. Reason
Compiler warning (level 3) C4638 XML document comment target: reference to unknown symbol 'symbol'.
Compiler warning (level 4) C4639 MSXML error, XML document comments will not be processed. Reason
Compiler warning (level 3) C4640 'instance': construction of local static object is not thread-safe
Compiler warning (level 3) C4641 XML document comment has an ambiguous cross reference:
Compiler warning (level 1) C4642 'class': could not import the constraints for generic parameter 'name'
Compiler warning (level 4, off) C4643 Forward declaring 'identifier' in namespace std is not permitted by the C++ Standard.
Compiler warning (level 1) C4644 usage of the macro-based offsetof pattern in constant expressions is non-standard; use offsetof defined in the C++ standard library instead
Compiler warning (level 3) C4645 function declared with __declspec(noreturn) has a return statement
Compiler warning (level 3) C4646 function declared with __declspec(noreturn) has non-void return type
Compiler warning (level 3) C4647 behavior change: __is_pod(type) has different value in previous versions
Compiler warning (level 3) C4648 standard attribute 'carries_dependency' is ignored
Compiler warning (level 3) C4649 attributes are ignored in this context
Compiler warning (level 1) C4650 debugging information not in precompiled header; only global symbols from the header will be available
Compiler warning (level 1) C4651 'definition' specified for precompiled header but not for current compile
Compiler warning (level 1) C4652 compiler option 'option' inconsistent with precompiled header; current command-line option will override that defined in the precompiled header
Compiler warning (level 2) C4653 compiler option 'option' inconsistent with precompiled header; current command-line option ignored
Compiler warning (level 4) C4654 Code placed before include of precompiled header line will be ignored. Add code to precompiled header.
Compiler warning (level 1) C4655 'symbol': variable type is new since the latest build, or is defined differently elsewhere
Compiler warning (level 1) C4656 'symbol': data type is new or has changed since the latest build, or is defined differently elsewhere
Compiler warning (level 1) C4657 expression involves a data type that is new since the latest build
Compiler warning (level 1) C4658 'function': function prototype is new since the latest build, or is declared differently elsewhere
Compiler warning (level 1) C4659 #pragma 'pragma': use of reserved segment 'segment' has undefined behavior, use #pragma comment(linker, ...)
Compiler warning (level 1) C4661 'identifier': no suitable definition provided for explicit template instantiation request
Compiler warning (level 1) C4662 explicit instantiation; template-class 'identifier1' has no definition from which to specialize 'identifier2'
Compiler warning (level 1) C4667 'function': no function template defined that matches forced instantiation
Compiler warning (level 4) C4668 'symbol' is not defined as a preprocessor macro, replacing with '0' for 'directive'
Compiler warning (level 1) C4669 'cast': unsafe conversion: 'class' is a managed type object
Compiler warning (level 4) C4670 'identifier': this base class is inaccessible
Compiler warning (level 4) C4671 'identifier': the copy constructor is inaccessible
Compiler warning (level 4) C4672 'identifier1': ambiguous. First seen as 'identifier2'
Compiler warning (level 4) C4673 throwing 'identifier' the following types will not be considered at the catch site
Compiler warning (level 1) C4674 'method' should be declared 'static' and have exactly one parameter
Compiler warning (level 4) C4676 '%s': the destructor is inaccessible
Compiler warning (level 1) C4677 'function': signature of non-private member contains assembly private type 'private_type'
Compiler warning (level 1) C4678 base class 'base_type' is less accessible than 'derived_type'
Compiler warning (level 1) C4679 'member': could not import member
Compiler warning (level 4) C4680 'class': coclass does not specify a default interface
Compiler warning (level 4) C4681 'class': coclass does not specify a default interface that is an event source
Compiler warning (level 4) C4682 'parameter': no directional parameter attribute specified, defaulting to [in]
Compiler warning (level 1) C4683 'function': event source has an 'out'-parameter; exercise caution when hooking multiple event handlers
Compiler warning (level 1) C4684 'attribute': WARNING!! attribute may cause invalid code generation: use with caution
Compiler warning (level 1) C4685 expecting '> >' found '>>' when parsing template parameters
Compiler warning (level 3) C4686 'user-defined type': possible change in behavior, change in UDT return calling convention
Compiler warning (Error) C4687 'class': a sealed abstract class cannot implement an interface 'interface'
Compiler warning (level 1) C4688 'constraint': constraint list contains assembly private type 'type'
Compiler warning (level 1) C4689 '%c': unsupported character in #pragma detect_mismatch; #pragma ignored
Compiler warning (level 4) C4690 [ emitidl( pop ) ]: more pops than pushes
Compiler warning (level 1) C4691 'type': type referenced was expected in unreferenced assembly 'file', type defined in current translation unit used instead
Compiler warning (level 1) C4692 'function': signature of non-private member contains assembly private native type 'native_type'
Compiler warning (level 1, Error) C4693 'class': a sealed abstract class cannot have any instance members 'instance member'
Compiler warning (level 1, Error) C4694 'class': a sealed abstract class cannot have a base-class 'base_class'
Compiler warning (level 1) C4695 #pragma execution_character_set: 'character set' is not a supported argument: currently only 'UTF-8' is supported
Compiler warning (level 1) C4696 /ZBvalue1 option out of range; assuming 'value2'
Compiler warning (level 3) C4698 'feature' is for evaluation purposes only and is subject to change or removal in future updates.
Compiler warning (level 1 and level 4) C4700 uninitialized local variable 'name' used
Compiler warning (level 4) C4701 potentially uninitialized local variable 'name' used
Compiler warning (level 4) C4702 unreachable code
Compiler warning (level 4) C4703 potentially uninitialized local pointer variable '%s' used
Compiler warning (level 4) C4706 assignment within conditional expression
Compiler warning (level 4) C4709 comma operator within array index expression
Compiler warning (level 4) C4710 'function': function not inlined
Compiler warning (level 1) C4711 function 'function' selected for automatic inline expansion
Compiler warning (level 4) C4714 function 'function' marked as __forceinline not inlined
Compiler warning (level 1) C4715 'function': not all control paths return a value
Compiler warning (level 1, Error) C4716 'function': must return a value
Compiler warning (level 1) C4717 'function': recursive on all control paths, function will cause runtime stack overflow
Compiler warning (level 4) C4718 'function call': recursive call has no side effects, deleting
Compiler warning (level 1) C4719 Double constant found when Qfast specified - use 'f' as a suffix to indicate single precision
Compiler warning (level 2) C4720 in-line assembler reports: 'message'
Compiler warning (level 1) C4721 'function': not available as an intrinsic
Compiler warning (level 1) C4722 'function': destructor never returns, potential memory leak
Compiler warning (level 3) C4723 potential divide by 0
Compiler warning (level 3) C4724 potential mod by 0
Compiler warning (level 3) C4725 instruction may be inaccurate on some Pentiums
Compiler warning C4726 ARM arch4/4T supports only '<cpsr_f> or <spsr_f>' with immediate value
Compiler warning (level 1) C4727 PCH named pch_file with same timestamp found in obj_file_1 and obj_file_2. Using first PCH.
Compiler warning (level 1) C4728 /Yl- option ignored because PCH reference is required
Compiler warning (level 4) C4729 function too big for flow graph based warnings
Compiler warning (Level 1) C4730 'main': mixing _m64 and floating point expressions may result in incorrect code
Compiler warning (Level 1) C4731 'pointer': frame pointer register 'register' modified by inline assembly code
Compiler warning (level 1) C4732 intrinsic '%s' is not supported in this architecture
Compiler warning (Level 1) C4733 Inline asm assigning to 'FS:0': handler not registered as safe handler
Compiler warning C4734 More than 64k line numbers in a COFF debug info section; stop emitting COFF debug line numbers for module 'module'
Compiler warning C4735 align_function attribute argument 'argument' is not a power of two and is not positive. Ignoring attribute
Compiler warning C4736 align_function attribute ignored because /Gy was not specified
Compiler warning (Level 3) C4738 storing 32-bit float result in memory, possible loss of performance
Compiler warning (level 1) C4739 reference to variable 'var' exceeds its storage space
Compiler warning (Level 4) C4740 flow in or out of inline asm code suppresses global optimization
Compiler warning (Level 1) C4742 'var' has different alignment in 'file1' and 'file2': number and number
Compiler warning (Level 1) C4743 'type' has different size in 'file1' and 'file2': number and number bytes
Compiler warning (Level 1) C4744 'var' has different type in 'file1' and 'file2': 'type1' and 'type2'
Compiler warning C4745 volatile access of 'name' cannot be honored due to its size
Compiler warning C4746 volatile access of 'expression' is subject to /volatile:<iso|ms> setting; consider using __iso_volatile_load/store intrinsic functions
Compiler warning (level 1) C4747 Calling managed 'entrypoint': Managed code may not be run under loader lock, including the DLL entrypoint and calls reached from the DLL entrypoint
Compiler warning (level 4) C4749 conditionally supported: offsetof applied to non-standard-layout type 'type'
Compiler warning (level 1) C4750 'identifier': function with _alloca() inlined into a loop
Compiler warning (level 4) C4751 /arch:AVX does not apply to Intel(R) Streaming SIMD Extensions that are within inline ASM
Compiler warning (level 4) C4752 found Intel(R) Advanced Vector Extensions; consider using /arch:AVX
Compiler warning C4753 Cannot find bounds for pointer; MPX intrinsic function ignored
Compiler warning (level 4) C4754 Conversion rules for arithmetic operations in the comparison at %s(%d) mean that one branch cannot be executed. Cast '%s' to '%s' (or similar type of %d bytes).
Compiler warning C4755 Conversion rules for arithmetic operations in the comparison at %s(%d) mean that one branch cannot be executed in an inlined function. Cast '%s' to '%s' (or similar type of %d bytes).
Compiler warning (level 2) C4756 overflow in constant arithmetic
Compiler warning (level 4) C4757 subscript is a large unsigned value, did you intend a negative constant?
Compiler warning C4761 integral size mismatch in argument; conversion supplied
Compiler warning (level 4) C4764 Can not align catch objects to greater than 16 bytes
Compiler warning (level 4) C4767 section name '%s' is longer than 8 characters and will be truncated by the linker
Compiler warning (level 3) C4768 __declspec attributes before linkage specification are ignored
Compiler warning (level 4) C4770 partially validated enum 'name' used as index
Compiler warning C4771 Bounds must be created using a simple pointer; MPX intrinsic function ignored
Compiler warning (level 1, Error) C4772 #import referenced a type from a missing type library; 'missing_type' used as a placeholder
Compiler warning (level 4) C4774 'string' : format string expected in argument number is not a string literal
Compiler warning (level 3) C4775 nonstandard extension used in format string 'string' of function 'function'
Compiler warning (level 1) C4776 '%character' is not allowed in the format string of function 'function'
Compiler warning (level 4) C4777 'function' : format string 'string' requires an argument of type 'type1', but variadic argument number has type 'type2'
Compiler warning (level 3) C4778 'function' : unterminated format string 'string'
Compiler warning (Level 1) C4788 'identifier': identifier was truncated to 'number' characters
Compiler warning (Level 1) C4789 buffer 'identifier' of size N bytes will be overrun; M bytes will be written starting at offset L
Compiler warning (level 2) C4792 function '%s' declared using sysimport and referenced from native code; import library required to link
Compiler warning (level 1 and 3) C4793 'function': function compiled as native: 'reason'
Compiler warning (level 1) C4794 segment of thread local storage variable '%s' changed from '%s' to '%s'
Compiler warning C4798 native code generated for p-code function 'name' with exception handler or unwind semantics
Compiler warning (level 1) C4799 function 'function' has no EMMS instruction

See also

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