Compiler Warnings C4400 Through C4599

Visual Studio 2015
 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Warnings C4400 Through C4599.

The articles in this part of the documentation contain information about a subset of the Visual C++ compiler warnings. You can access the information here or, in the Output window in Visual Studio, you can select a warning number and then choose the F1 key.

WarningMessage
Compiler Warning (level 1) C4600#pragma 'macro name': expected a valid non-empty string
Compiler Warning (level 4) C4400'type': const/volatile qualifiers on this type are not supported
Compiler Warning (level 1) C4401'bitfield': member is bit field
Compiler Warning (level 1) C4402must use PTR operator
Compiler Warning (level 1) C4403illegal PTR operator
Compiler Warning (level 3) C4404period on directive ignored
Compiler Warning (level 1) C4405'identifier': identifier is reserved word
Compiler Warning (level 1) C4406operand on directive ignored
Compiler Warning (level 1) C4407cast between different pointer to member representations, compiler may generate incorrect code
Compiler Warning (level 4) C4408anonymous 'struct|union' did not declare any data members
Compiler Warning (level 1) C4409illegal instruction size
Compiler Warning (level 1) C4410illegal size for operand
Compiler Warning (level 1) C4411'identifier': symbol resolves to displacement register
Compiler Warning (level 2) C4412'function': function signature contains type 'type'; C++ objects are unsafe to pass between pure code and mixed or native.
Compiler warning C4413'classname::member': reference member is initialized to a temporary that doesn't persist after the constructor exits
Compiler Warning (level 3) C4414'function': short jump to function converted to near
Compiler warning (level 1) C4415duplicate __declspec(code_seg('%$I'))
Compiler warning (level 1) C4416__declspec(code_seg(...)) contains empty string: ignored
Compiler warning (level 1) C4417an explicit template instantiation cannot have __declspec(code_seg(...)): ignored
Compiler warning (level 1) C4418__declspec(code_seg(...)) ignored on an enum
Compiler warning (level 3) C4419'%$I' has no effect when applied to private ref class '%$S'.
Compiler Warning (level 1) C4420'checked_operator': operator not available, using 'operator' instead; run-time checking may be compromised
Compiler warning (level 3) C4421'%$I': a reference parameter on a resumable function is potentially unsafe
Compiler warning (level 3) C4423'std::bad_alloc': will be caught by class ('%$T') on line %d
Compiler warning (level 3) C4424catch for '%$T' preceded by '%$T' on line %d; unpredictable behavior may result if 'std::bad_alloc' is thrown
Compiler warning (level 1) C4425A SAL annotation cannot be applied to '...'
Compiler warning C4426optimization flags changed after including header, may be due to #pragma optimize()
Compiler warning (level 1) C4427'%$L': overflow in constant division, undefined behavior
Compiler Warning (level 4) C4429possible incomplete or improperly formed universal-character-name
Compiler Warning C4430missing type specifier - int assumed. Note: C++ does not support default-int
Compiler Warning (level 4) C4431missing type specifier - int assumed. Note: C no longer supports default-int
Compiler Warning (level 4) C4434a static constructor must have private accessibility; changing to private access
Compiler Warning (level 4) C4435'derived_class': Object layout under /vd2 will change due to virtual base 'base_class'
Compiler Warning (level 1) C4436dynamic_cast from virtual base 'base_class' to 'derived_class' in constructor or destructor could fail with partially-constructed object
Compiler Warning (level 4) C4437dynamic_cast from virtual base 'base_class' to 'derived_class' could fail in some contexts
Compiler warning C4438'%$S': cannot be called safely in /await:clrcompat mode. If '%$S' calls into the CLR it may result in CLR head corruption
Compiler Warning C4439'function': function definition with a managed type in the signature must have a __clrcall calling convention
Compiler Warning (level 1) C4440calling convention redefinition from 'calling_convention1' to 'calling_convenction2' ignored
Compiler Warning (level 1) C4441calling convention of 'calling_convention1' ignored; 'calling_convention2' used instead
Compiler warning (level 1) C4442embedded null terminator in __annotation argument. Value will be truncated.
Compiler warning (level 1) C4443expected pragma parameter to be '0', '1', or '2'
Compiler warning (level 3) C4444'identifier': top level '__unaligned' is not implemented in this context
Compiler Warning (level 1) C4445'function': in a 'WinRT|managed' type a virtual method cannot be private
Compiler warning (level 1) C4446'%$S': cannot map member '%$I' into this type, due to conflict with the type name. The method was renamed to '%$I'
Compiler warning (level 1) C4447'main' signature found without threading model. Consider using 'int main(Platform::Array<Platform::String^>^ args)'.
Compiler warning C4448'%$S' does not have a default interface specified in metadata. Picking: '%$S', which may fail at runtime.
Compiler warning C4449'%$S' an unsealed type should be marked as '[WebHostHidden]'
Compiler warning C4450'%$S' should be marked as '[WebHostHidden]' because it derives from '%$S'
Compiler warning (level 4) C4451'classname1::member': Usage of ref class 'classname2::member' inside this context can lead to invalid marshaling of object across contexts
Compiler warning (level 1) C4452'identifier': public type cannot be at global scope. It must be in a namespace that is a child of the name of the output .winmd file.
Compiler warning (level 1) C4453'%$S': A '[WebHostHidden]' type should not be used on the published surface of a public type that is not '[WebHostHidden]'
Compiler warning (level 1) C4454'%$S' is overloaded by more than the number of input parameters without having [DefaultOverload] specified. Picking '%$D' as the default overload
Compiler warning (level 1) C4455'operator %$I': literal suffix identifiers that do not start with an underscore are reserved
Compiler warning (level 3) C4456declaration of 'identifier' hides previous local declaration
Compiler warning (level 3) C4457declaration of 'identifier' hides function parameter
Compiler warning (level 3) C4458declaration of 'identifier' hides class member
Compiler warning (level 3) C4459declaration of 'identifier' hides global declaration
Compiler Warning (level 4) C4460'WinRT|managed' operator 'operator', has parameter passed by reference. 'WinRT|managed' operator 'operator' has different semantics from C++ operator 'cpp_operator', did you intend to pass by value?
Compiler Warning (level 1) C4461'classname': this class has a finalizer '!finalizer' but no destructor '~dtor'
Compiler Warning (level 1) C4462'type' : cannot determine the GUID of the type. Program may fail at runtime.
Compiler warning C4463overflow; assigning 'value' to bit-field that can only hold values from 'mi_valuen' to 'max_value'
Compiler warning C4464relative include path contains '..'
Compiler Warning (level 1) C4470floating-point control pragmas ignored under /clr
Compiler warning (level 4) C4471'enumeration': a forward declaration of an unscoped enumeration must have an underlying type (int assumed)
Compiler warning (level 1) C4472'identifier' is a native enum: add an access specifier (private/public) to declare a 'WinRT|managed' enum
Compiler warning C4480nonstandard extension used: specifying underlying type for enum 'enumeration'
Compiler Warning (level 4) C4481nonstandard extension used: override specifier 'keyword'
Compiler warning C4482nonstandard extension used: enum 'enumeration' used in qualified name
Compiler warning (level 1) C4483syntax error: expected C++ keyword
Compiler Warning C4484'override_function': matches base ref class method 'base_class_function', but is not marked 'virtual', 'new' or 'override'; 'new' (and not 'virtual') is assumed
Compiler Warning C4485'override_function': matches base ref class method 'base_class_function', but is not marked 'new' or 'override'; 'new' (and 'virtual') is assumed
Compiler Warning (level 1) C4486'function': a private virtual method of a ref class or value class should be marked 'sealed'
Compiler Warning (level 4) C4487'derived_class_function': matches inherited non-virtual method 'base_class_function' but is not explicitly marked 'new'
Compiler Warning (level 1) C4488'function': requires 'keyword' keyword to implement the interface method 'interface_method'
Compiler Warning (level 1) C4489'specifier': not allowed on interface method 'method'; override specifiers are only allowed on ref class and value class methods
Compiler Warning (level 1) C4490'override': incorrect use of override specifier; 'function' does not match a base ref class method
Compiler warning (level 1) C4491'%s': has an illegal IDL version format
Compiler warning (level 1) C4492'%$S': matches base ref class method '%$S', but is not marked 'override'
Compiler warning (level 3) C4493delete expression has no effect as the destructor of 'type' does not have 'public' accessibility
Compiler warning (level 1) C4494'%$S' : Ignoring __declspec(allocator) because the function return type is not a pointer or reference
Compiler Warning (level 1) C4502'linkage specification' requires use of keyword 'extern' and must precede all other specifiers
Compiler Warning (level 1) C4503'identifier': decorated name length exceeded, name was truncated
Compiler Warning (level 4) C4505'function': unreferenced local function has been removed
Compiler Warning (level 1) C4506no definition for inline function 'function'
Compiler Warning (level 1) C4508'function': function should return a value; 'void' return type assumed
Compiler warning C4509nonstandard extension used: 'function' uses SEH and 'object' has destructor
Compiler Warning (level 4) C4510'class': default constructor was implicitly defined as deleted
Compiler Warning (level 3) C4511'class': copy constructor was implicitly defined as deleted
Compiler Warning (level 4) C4512'class': assignment operator was implicitly defined as deleted
Compiler Warning (level 4) C4513'class': destructor was implicitly defined as deleted
Compiler Warning (level 4) C4514'function': unreferenced inline function has been removed
Compiler Warning (level 4) C4515'namespace': namespace uses itself
Compiler Warning (level 4) C4516'class::symbol': access-declarations are deprecated; member using-declarations provide a better alternative
Compiler Warning (level 4) C4517access-declarations are deprecated; member using-declarations provide a better alternative
Compiler Warning (level 1) C4518'specifier': storage-class or type specifier(s) unexpected here; ignored
Compiler warning C4519default template arguments are only allowed on a class template
Compiler Warning (level 3) C4520'class': multiple default constructors specified
Compiler Warning (level 3) C4521'class': multiple copy constructors specified
Compiler Warning (level 3) C4522'class': multiple assignment operators specified
Compiler Warning (level 3) C4523'class': multiple destructors specified
Compiler Warning (level 1) C4526'function': static member function cannot override virtual function 'virtual function'\n override ignored, virtual function will be hidden
Compiler Warning (level 1) C4530C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
Compiler warning (level 1) C4531C++ exception handling not available on Windows CE. Use Structured Exception Handling
Compiler Warning (level 1) C4532'continue': jump out of '__finally/finally' block has undefined behavior during termination handling
Compiler Warning (level 1) C4533initialization of 'variable' is skipped by 'goto label'
Compiler Warning (level 3) C4534'constructor' will not be a default constructor for 'class|struct' 'identifier' due to the default argument
Compiler Warning (level 3) C4535calling _set_se_translator() requires /EHa
Compiler Warning (level 4) C4536'typename': type-name exceeds meta-data limit of 'character_limit' characters
Compiler Warning (level 1) C4537'object': '.' applied to non-UDT type
Compiler Warning (level 3) C4538'type': const/volatile qualifiers on this type are not supported
Compiler Warning (level 1) C4539'character': a universal-character-name specifies an invalid character
Compiler Warning (level 1) C4540dynamic_cast used to convert to inaccessible or ambiguous base; run-time test will fail ('type1' to 'type2')
Compiler Warning (level 1) C4541'identifier' used on polymorphic type 'type' with /GR-; unpredictable behavior may result
Compiler warning (level 1) C4542Skipping generation of merged injected text file, cannot write %$M file: '%s': %$e
Compiler Warning (level 3) C4543Injected text suppressed by attribute 'no_injected_text'
Compiler Warning (level 1) C4544'declaration': default template argument ignored on this template declaration
Compiler Warning (level 1) C4545expression before comma evaluates to a function which is missing an argument list
Compiler Warning (level 1) C4546function call before comma missing argument list
Compiler Warning (level 1) C4547'operator': operator before comma has no effect; expected operator with side-effect
Compiler Warning (level 1) C4548expression before comma has no effect; expected expression with side-effect
Compiler Warning (level 1) C4549'operator': operator before comma has no effect; did you intend 'operator'?
Compiler Warning (level 1) C4550expression evaluates to a function which is missing an argument list
Compiler Warning (level 1) C4551function call missing argument list
Compiler Warning (level 1) C4552'operator': operator has no effect; expected operator with side-effect
Compiler Warning (level 1) C4553'operator': operator has no effect; did you intend 'operator?
Compiler Warning (level 3) C4554 C4554'operator': check operator precedence for possible error; use parentheses to clarify precedence
Compiler Warning (level 1) C4555expression has no effect; expected expression with side-effect
Compiler Warning (level 1) C4556value of intrinsic immediate argument 'value' is out of range 'lower_bound - upper_bound'
Compiler Warning (level 3) C4557'__assume' contains effect 'effect'
Compiler Warning (level 1) C4558value of operand 'value' is out of range 'lower_bound - upper_bound'
Compiler Warning (level 4) C4559'function': redefinition; the function gains __declspec(modifier)
Compiler Warning (level 1) C4561'__fastcall' incompatible with the '/clr' option: converting to '__stdcall'
Compiler warning (level 4) C4562fully prototyped functions are required with the '/clr' option: converting '()' to '(void)'
Compiler Warning (level 4) C4564method 'method' of 'class' 'classname' defines unsupported default parameter 'parameter'
Compiler Warning (level 4) C4565'function': redefinition; the symbol was previously declared with __declspec(modifier)
Compiler Warning (level 1) C4566character represented by universal-character-name 'char' cannot be represented in the current code page (%d)
Compiler warning (level 1) C4568'%$S': no members match the signature of the explicit override
Compiler warning (level 3) C4569'%$S': no members match the signature of the explicit override
Compiler Warning (level 3) C4570'type': is not explicitly declared as abstract but has abstract functions
Compiler Warning (level 4) C4571Informational: catch(...) semantics changed since Visual C++ 7.1; structured exceptions (SEH) are no longer caught
Compiler Warning (level 1) C4572[ParamArray] attribute is deprecated under /clr, use '...' instead
Compiler warning (level 1) C4573the usage of '%$S' requires the compiler to capture 'this' but the current default capture mode does not allow it
Compiler warning (level 4) C4574'Identifier' is defined to be '0': did you mean to use '#if identifier'?
Compiler warning (level 1) C4575'__vectorcall' incompatible with the '/clr' option: converting to '__stdcall'
Compiler Warning (level 3) C4580[attribute] is deprecated; instead specify System::Attribute or Platform::Metadata as a base class
Compiler Warning (level 1) C4581deprecated behavior: '"string"' replaced with 'string' to process attribute
Compiler warning (level 4) C4582'%$S': constructor is not implicitly called
Compiler warning (level 4) C4583'%$S': destructor is not implicitly called
Compiler Warning (level 1) C4584'class1': base-class 'class2' is already a base-class of '%class3'
Compiler warning (level 1) C4585'class': A WinRT 'public ref class' must either be sealed or derive from an existing unsealed class
Compiler warning (level 1) C4586'%$S': A public type cannot be declared in a top-level namespace called 'Windows'
Compiler warning (level 1) C4587'anonymous_structure': behavior change: constructor is no longer implicitly called
Compiler warning (level 1) C4588'anonymous_structure': behavior change: destructor is no longer implicitly called
Compiler warning (level 1) C4591'constexpr' call-depth limit of %d exceeded (/constexpr:depth<NUMBER>)
Compiler warning (level 3) C4592'function': 'constexpr' call evaluation failed; function will be called at run-time
Compiler warning (level 1) C4593'function': 'constexpr' call evaluation step limit of 'limit' exceeded; use /constexpr:steps<NUMBER> to increase the limit
Compiler warning (level 3) C4594'%$S': destructor will not be implicitly called if an exception is thrown
Compiler warning (level 1) C4595'%$S': behavior change: destructor will no longer be implicitly called if an exception is thrown
Show: