Compiler Warnings C4000 Through C4199


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

The latest version of this topic can be found at Compiler Warnings C4000 Through C4199.

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.

Compiler warning C4000UNKNOWN WARNING

Please choose the Technical Support command on the Visual C++

Help menu, or open the Technical Support help file for more information
Compiler Warning (level 4) C4001nonstandard extension 'single line comment' was used
Compiler warning (level 1) C4002too many actual parameters for macro 'identifier'
Compiler Warning (level 1) C4003not enough actual parameters for macro 'identifier'
Compiler Warning (level 1) C4005'identifier': macro redefinition
Compiler warning (level 1) C4006#undef expected an identifier
Compiler Warning (level 2) C4007'function': must be 'attribute'
Compiler warning (level 3) C4008'function': 'atribute' attribute ignored
Compiler Warning (level 1) C4010single-line comment contains line-continuation character
Compiler Warning (level 3) C4013'function' undefined; assuming extern returning int
Compiler Warning (level 1) C4015'identifer': type of bit field must be integral
Compiler Warning (level 3) C4018'expression': signed/unsigned mismatch
Compiler warning (level 4) C4019empty statement at global scope
Compiler Warning (level 1) C4020'function': too many actual parameters
Compiler Warning (level 1) C4022'function': pointer mismatch for actual parameter 'parameter number'
Compiler warning (level 1) C4023'function': based pointer passed to unprototyped function: parameter 'parameter_number'
Compiler Warning (level 1) C4024'function': different types for formal and actual parameter 'parameter_number'
Compiler warning (level 1) C4025'function': based pointer passed to function with variable arguments: parameter 'parameter_number'
Compiler warning (level 1) C4026function declared with formal parameter list
Compiler warning (level 1) C4027function declared without formal parameter list
Compiler Warning (level 1) C40288formal parameter 'parameter_number' different from declaration
Compiler Warning (level 1) C4029declared formal parameter list different from definition
Compiler warning (level 1) C4030first formal parameter list longer than the second list
Compiler Warning (level 1) C4031second formal parameter list longer than the first list
Compiler Warning (level 4) C4032formal parameter 'parameter_number' has different type when promoted
Compiler warning (level 1) C4033'function' must return a value
Compiler Warning (level 1) C4034sizeof returns 0
Compiler warning (level 3) C4035'function': no return value
Compiler warning (level 1) C4036unnamed 'type' as actual parameter
Compiler warning (level 1) C4038'modifier': illegal class modifier
Compiler warning (level 1) C4041compiler limit: terminating browser output
Compiler Warning (level 1) C4042'identifier': has bad storage class
Compiler warning (level 1) C4045'array': array bounds overflow
Compiler Warning (level 1) C4047'operator': 'identifier1' differs in levels of indirection from 'identifier2'
Compiler Warning (level 1) C4048different array subscripts: 'identifier1' and 'identifier2'
Compiler Warning (level 1) C4049compiler limit: terminating line number emission
Compiler warning (level 1) C4051type conversion; possible loss of data
Compiler warning (level 4) C4052function declarations different; one contains variable arguments
Compiler warning (level 4) C4053one void operand for '?:'
Compiler warning (level 1 and level 4) C4054'conversion': from function pointer 'type1' to data pointer 'type2'
Compiler warning (level 1 and level 4) C4055'conversion': from data pointer 'type1' to function pointer 'type2'
Compiler Warning (level 2) C4056overflow in floating-point constant arithmetic
Compiler warning (level 4) C4057'operator': 'identifier1' differs in indirection to slightly different base types from 'identifier2'
Compiler warning C4060switch statement contains no 'case' or 'default' labels
Compiler Warning (level 4) C4061enumerator 'identifier' in switch of enum 'enumeration' is not explicitly handled by a case label
Compiler Warning (level 4) C4062enumerator 'identifier' in switch of enum 'enumeration' is not handled
Compiler warning C4063case 'identifier' is not a valid value for switch of enum 'enumeration'
Compiler warning C4064switch of incomplete enum 'enumeration'
Compiler warning C4065switch statement contains 'default' but no 'case' labels
Compiler warning (level 3) C4066characters beyond first in wide-character constant ignored
Compiler Warning (level 1) C4067unexpected tokens following preprocessor directive - expected a newline
Compiler warning (level 1) C4068unknown pragma
Compiler warning C4069long double is the same precision as double
Compiler Warning (level 3) C4073initializers put in library initialization area
Compiler Warning (level 1) C4074initializers put in compiler reserved initialization area
Compiler warning (level 1) C4075initializers put in unrecognized initialization area
Compiler warning (level 1) C4076'type_modifier': can not be used with type 'typename'
Compiler warning (level 1) C4077unknown check_stack option
Compiler Warning (level 1) C4079unexpected token 'token'
Compiler warning (level 1) C4080expected identifier for segment name; found 'symbol'
Compiler warning (level 1) C4081expected 'token1'; found 'token2'
Compiler Warning (level 1) C4083expected 'token'; found identifier 'identifier'
Compiler warning (level 1) C4085expected pragma parameter to be 'on' or 'off'
Compiler warning (level 1) C4086expected pragma parameter to be '1', '2', '4', '8', or '16'
Compiler warning (level 1) C4087'function': declared with 'void' parameter list
Compiler Warning (level 1) C4088'function': pointer mismatch in actual parameter 'parameter_number', formal parameter 'parameter_number'
Compiler Warning (level 1) C4089'function': different types in actual parameter 'parameter_number', formal parameter 'parameter_number'
Compiler Warning (level 1) C4090'operation': different 'modifier' qualifiers
Compiler Warning (level 1) C4091keyword': ignored on left of 'type' when no variable is declared
Compiler Warning (level 4) C4092sizeof returns 'unsigned long'
Compiler Warning (level 2) C4094untagged 'token' declared no symbols
Compiler Warning (level 1) C4096'identifier': interface is not a COM interface; will not be emitted to IDL
Compiler warning (level 1) C4097expected pragma parameter to be 'restore' or 'off'
Compiler Warning (level 1) C4098'function': 'void' function returning a value
Compiler Warning (level 2) C4099'identifier': type name first seen using 'object_type1' now seen using 'object_type2'
Compiler Warning (level 4) C4100'identifier': unreferenced formal parameter
Compiler Warning (level 3) C4101'identifier': unreferenced local variable
Compiler warning (level 3) C4102'label': unreferenced label
Compiler Warning (level 1) C4103'filename': alignment changed after including header, may be due to missing #pragma pack(pop)
Compiler warning (level 1) C4109unexpected identifier 'identifier'
Compiler warning (level 1) C4112#line requires an integer between 1 and 'line_count'
Compiler Warning (level 1) C4113'identifier1' differs in parameter lists from 'identifier2'
Compiler Warning (level 1) C4114same type qualifier used more than once
Compiler warning (level 1 and level 4) C4115'type': named type definition in parentheses
Compiler Warning (level 1) C4116unnamed type definition in parentheses
Compiler warning (level 1) C4117macro name 'name' is reserved, 'command' ignored
Compiler warning (level 1) C4119different bases 'base1' and 'base2' specified
Compiler warning (level 1) C4120based/unbased mismatch
Compiler Warning (level 4) C4121'symbol': alignment of a member was sensitive to packing
Compiler warning (level 1) C4122'function': alloc_text applicable only to functions with C linkage
Compiler warning (level 1) C4123different base expressions specified
Compiler Warning (level 1) C4124__fastcall with stack checking is inefficient
Compiler warning (level 4) C4125decimal digit terminates octal escape sequence
Compiler Warning (level 4) C4127conditional expression is constant
Compiler Warning (level 1) C4129'character': unrecognized character escape sequence
Compiler warning (level 4) C4130'operator': logical operation on address of string constant
Compiler warning (level 4) C4131'function': uses old-style declarator
Compiler warning (level 4) C4132'object': const object should be initialized
Compiler Warning (level 3) C4133'expression': incompatible types - from 'type1' to 'type2'
Compiler warning C4137'function': no return value from floating-point function
Compiler warning (level 1) C4138'*/' found outside of comment
Compiler warning (level 1) C4141'modifier': used more than once
Compiler Warning (level 1) C4142benign redefinition of type
Compiler warning (level 1) C4143pragma 'same_seg' not supported; use __based allocation
Compiler Warning (level 1) C4144'expression': relational expression as switch expression
Compiler warning (level 1) C4145'expression1': relational expression as switch expression; possible confusion with 'expression2'
Compiler Warning (level 2) C4146unary minus operator applied to unsigned type, result still unsigned
Compiler Warning (level 2) C4150deletion of pointer to incomplete type 'type'; no destructor called
Compiler warning (level 4) C4152nonstandard extension, function/data pointer conversion in expression
Compiler warning (level 1) C4153function/data pointer conversion in expression
Compiler Warning (level 1) C4154deletion of an array expression; conversion to pointer supplied
Compiler warning (level 1) C4155deletion of an array expression without using the array form of 'delete'
Compiler Warning (level 2) C4156deletion of an array expression without using the array form of 'delete'; array form substituted
Compiler Warning (level 1) C4157pragma was ignored by C compiler
Compiler warning (level 1) C4158assuming #pragma pointers_to_members(full_generality, 'inheritance_type')
Compiler Warning (level 3) C4159#pragma 'pragma'(pop,...): has popped previously pushed identifier 'identifier'
Compiler warning (level 1) C4160#pragma 'pragma'(pop,...): did not find previously pushed identifier 'identifier'
Compiler warning (level 3) C4161#pragma 'pragma'(pop...): more pops than pushes
Compiler Warning (level 1) C4162'identifier': no function with C linkage found
Compiler warning (level 1) C4163'identifier': not available as an intrinsic function
Compiler warning (level 1) C4164'function': intrinsic function not declared
Compiler warning (level 1) C4165'HRESULT' is being converted to 'bool'; are you sure this is what you want?
Compiler warning (level 1) C4166illegal calling convention for constructor/destructor
Compiler warning (level 1) C4167'function': only available as an intrinsic function
Compiler warning (level 1) C4168compiler limit: out of debugger types, delete program database 'database' and rebuild
Compiler Warning (level 1) C4172returning address of local variable or temporary
Compiler warning (level 1) C4174'name': not available as a #pragma component
Compiler warning (level 1) C4175#pragma component(browser, on): browser info must initially be specified on the command line
Compiler warning (level 1) C4176'subcomponent': unknown subcomponent for #pragma component browser
Compiler warning (level 1) C4177#pragma 'pragma' should only be used at global scope or namespace scope
Compiler warning (level 1) C4178case constant 'constant' too big for the type of the switch expression
Compiler warning (level 4) C4179'//*': parsed as '/' and '/*': confusion with standard '//' comments
Compiler warning (level 1) C4180qualifier applied to function type has no meaning; ignored
Compiler warning C4181qualifier applied to reference type; ignored
Compiler warning (level 1) C4182#include nesting level is 'nest_count' deep; possible infinite recursion
Compiler Warning (level 1) C4183'identifier': missing return type; assumed to be a member function returning 'int'
Compiler warning (level 1) C4185ignoring unknown #import attribute 'attribute'
Compiler warning (level 1) C4186#import attribute 'attribute' requires 'argument_count' arguments; ignored
Compiler warning (level 1) C4187#import attributes 'attribute1' and 'attribute2' are incompatible; both ignored
Compiler warning (level 1) C4188constant expression is not integral
Compiler warning (level 4) C4189'identifier': local variable is initialized but not referenced
Compiler Warning (level 1) C4190'identifier1' has C-linkage specified, but returns UDT 'identifier2' which is incompatible with C
Compiler warning (level 3) C4191'operator/operation': unsafe conversion from 'type_of_expression' to 'type_required'\nCalling this function through the result pointer may cause your program to fail
Compiler Warning (level 3) C4192automatically excluding 'identifier' while importing type library 'library'
Compiler warning (level 3) C4193#pragma warning(pop): no matching '#pragma warning(push)'
Compiler warning (level 1) C4194#pragma start_map_region cannot be nested; ignored
Compiler warning (level 1) C4195#pragma stop_map_region used without matching #pragma start_map_region; ignored
Compiler warning (level 1) C4196expected '%$L' or '%$L'; found '%$L'
Compiler Warning (level 3) C4197'type': top-level volatile in cast is ignored
Compiler warning (level 1, level 2, level 3, and level 4) C4199%s