Compiler Warnings C4200 Through C4399
TOC
Collapse the table of content
Expand the table of content

Compiler Warnings C4200 Through C4399

 

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.

In This Section

Warning

Message

Compiler Warning (levels 2 and 4) C4200

nonstandard extension used: zero-sized array in struct/union

Compiler Warning (level 4) C4201

nonstandard extension used: nameless struct/union

Compiler Warning (level 4) C4202

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

nonstandard extension used: non-constant aggregate initializer

Compiler Warning (level 4) C4205

nonstandard extension used: static function declaration in function scope

Compiler Warning (level 4) C4206

nonstandard extension used: translation unit is empty

Compiler Warning (level 4) C4207

nonstandard extension used: extended initializer form

Compiler Warning (level 4) C4208

nonstandard extension used: delete [exp] - exp evaluated but ignored

Compiler Warning (level 4) C4210

nonstandard extension used: function given file scope

Compiler Warning (level 4) C4211

nonstandard extension used: redefined extern to static

Compiler Warning (level 4) C4212

nonstandard extension used: function declaration used ellipsis

Compiler Warning (level 4) C4213

nonstandard extension used: cast on l-value

Compiler Warning (level 4) C4214

nonstandard extension used: bit field types other than int

Compiler Warning (level 1) C4215

nonstandard extension used: long float

Compiler Warning (level 1) C4216

nonstandard extension used: float long

Compiler Warning (level 1) C4218

nonstandard extension used: must specify at least a storage class or a type

Compiler Warning (level 4) C4220

varargs matches remaining parameters

Compiler Warning (level 4) C4221

nonstandard extension used: 'identifier': cannot be initialized using address of automatic variable 'variable'

Compiler Warning (levels 1 and 4) C4223

nonstandard extension used: non-lvalue array converted to pointer

Compiler Warning (level 1) C4224

nonstandard extension used: formal parameter 'identifier' was previously defined as a type

Compiler Warning (level 1) C4226

nonstandard extension used: 'keyword' is an obsolete keyword

Compiler Warning (level 1) C4227

anachronism used: qualifiers on reference are ignored

Compiler Warning (level 1) C4228

nonstandard extension used: qualifiers after comma in declarator list are ignored

Compiler Warning (level 1) C4229

anachronism used: modifiers on data are ignored

Compiler Warning (level 1) C4230

anachronism used: modifiers/qualifiers interspersed; qualifier ignored

Compiler Warning (level 4) C4232

nonstandard extension used: 'identifier': address of dllimport 'dllimport' is not static, identity not guaranteed

Compiler Warning (level 4) C4233

nonstandard extension used: 'keyword' keyword only supported in C++, not C

Compiler Warning (level 4) C4234

nonstandard extension used: 'keyword' keyword reserved for future use

Compiler Warning (level 4) C4235

nonstandard extension used: 'keyword' keyword not supported on this architecture

Compiler Warning (level 1) C4237

'keyword' keyword is not yet supported, but reserved for future use

Compiler Warning (level 4) C4238

nonstandard extension used: class rvalue used as lvalue

Compiler Warning (level 4) C4239

nonstandard extension used: 'token': conversion from 'type1' to 'type2'

Compiler Warning (level 3) C4240

nonstandard extension used: access to 'classname' now defined to be 'acess_specifier1', previously it was defined to be 'access_specifier2'

Compiler Warning (level 4) C4242

'identfier': conversion from 'type1' to 'type1', possible loss of data

Compiler Warning (level 3) C4243

'conversion_type' conversion from 'type1' to 'type1' exists, but is inaccessible

Compiler Warning (level 2) C4244

'conversion_type': conversion from 'type1' to 'type2', possible loss of data

Compiler Warning (levels 3 and 4) C4244

'conversion_type': conversion from 'type1' to 'type2', possible loss of data

Compiler Warning (level 4) C4245

'conversion_type': conversion from 'type1' to 'type2', signed/unsigned mismatch

Compiler Warning (level 2) C4250

'classname': inherits 'base_classname::member' via dominance

Compiler Warning (level 1) C4251

'identifier': 'object_type1' 'identifier1' needs to have dll-interface to be used by clients of 'object_type' 'identfier2'

Compiler Warning (level 4) C4254

'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data

Compiler Warning (level 4) C4255

'function': no function prototype given: converting '()' to '(void)'

Compiler Warning (level 4) C4256

'function': constructor for class with virtual bases has '...'; calls may not be compatible with older versions of Visual C++

Compiler Warning (level 1) C4258

'variable': definition from the for loop is ignored; the definition from the enclosing scope is used

Compiler Warning (level 4) C4263

'function': member function does not override any base class virtual member function

Compiler Warning (level 1) C4264

'virtual_function': no override available for virtual member function from base 'classname'; function is hidden

Compiler Warning (level 3) C4265

'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

'virtual_function': no override available for virtual member function from base 'classname'; function is hidden

Compiler Warning (level 3) C4267

'variable': conversion from 'size_t' to 'type', possible loss of data

Compiler Warning (level 4) C4268

'identifier': 'const' static/global data initialized with compiler generated default constructor fills the object with zeros

Compiler Warning (level 1) C4269

'identifier': 'const' automatic data initialized with compiler generated default constructor produces unreliable results

Compiler Warning (level 1) C4272

'function': is marked __declspec(dllimport); must specify native calling convention when importing a function.

Compiler Warning (level 1) C4273

'function': inconsistent dll linkage

Compiler warning (level 1) C4274

#ident ignored; see documentation for #pragma comment(exestr, 'string')

Compiler Warning (level 2) C4275

non dll-interface 'classkey' 'identifier1' used as base for dll-interface 'classkey' 'identifier2'

Compiler Warning (level 1) C4276

'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

'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

'operator ->' was self recursive through type 'type'

Compiler Warning (level 3) C4281

'operator ->' recursion occurred through type 'type1'

Compiler Warning (level 3) C4282

then through type 'type2'

Compiler Warning (level 3) C4283

and through type 'typeN'

Compiler Warning (level 2) C4285

return type for 'identifier::operator ->' is recursive if applied using infix notation

Compiler Warning (level 1) C4286

'derived_type': is caught by base class ('base_type') on line 'line_number'

Compiler Warning (level 3) C4287

'operator': unsigned/negative constant mismatch

Compiler Warning (level 1) C4288

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

nonstandard extension used: 'variable': loop control variable declared in the for-loop is used outside the for-loop scope

Compiler Warning (level 3) C4290

C++ exception specification ignored except to indicate a function is not __declspec(nothrow)

Compiler Warning (level 1) C4291

'declaration': no matching operator delete found; memory will not be freed if initialization throws an exception

Compiler Warning (level 1) C4293

'shift_operator': shift count negative or too big, undefined behavior

Compiler Warning (level 4) C4295

'array': array is too small to include a terminating null character

Compiler Warning (level 4) C4296

'operator': expression is always 'boolean_value'

Compiler Warning (level 1) C4297

'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

'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

'conversion': truncation from 'type1' to 'type2'

Compiler Warning (level 3) C4306

'conversion': conversion from 'type1' to 'type2' of greater size

Compiler Warning (level 2) C4307

'operator': integral constant overflow

Compiler Warning (level 2) C4308

negative integral constant converted to unsigned type

Compiler Warning (level 2) C4309

'conversion': truncation of constant value

Compiler Warning (level 3) C4310

cast truncates constant value

Compiler Warning (level 1) C4311

'variable': pointer truncation from 'type1' to 'type2'

Compiler Warning (level 1) C4312

'operation': conversion from 'type1' to 'type2' of greater size

Compiler Warning (level 1) C4313

'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

'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

'operator': zero extending 'type1' to 'type2' of greater size

Compiler warning (level 1) C4321

automatically generating an IID for interface '%$S'

Compiler warning (level 1) C4322

automatically generating a CLSID for class '%$S'

Compiler warning (level 1) C4323

re-using registered CLSID for class '%$S'

Compiler Warning (level 4) C4324

'structname': structure was padded due to __declspec(align())

Compiler Warning (level 1) C4325

attributes for standard section 'section' ignored

Compiler Warning (level 1) C4326

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

__declspec(align()) is ignored on enum

Compiler warning (level 1) C4330

attribute '%s' for section '%s' ignored

Compiler Warning (level 1) C4333

'shift_operator': right shift by too large amount, data loss

Compiler Warning (level 3) C4334

'shift_operator': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)

Compiler Warning C4335

Mac file format detected: please convert the source file to either DOS or UNIX format

Compiler Warning (level 4) C4336

import cross-referenced type library 'library1' before importing 'library2'

Compiler Warning (level 4) C4337

cross-referenced type library 'library1' in 'library2' is being automatically imported

Compiler warning (level 4) C4338

#pragma %s: standard section '%s' is used

Compiler Warning (level 4) C4339

'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

'value': value wrapped from positive to negative value

Compiler Warning (level 1) C4342

behavior change: 'function' called, but a member operator was called in previous versions

Compiler warning (level 4) C4343

#pragma optimize("g",off) overrides /Og option

Compiler Warning (level 1) C4344

behavior change: use of explicit template arguments results in call to 'function'

Compiler Warning (level 1) C4346

'name': dependent name is not a type

Compiler Warning (level 1) C4348

'type': redefinition of default parameter: parameter 'parameter_number'

Compiler Warning (level 1) C4350

behavior change: 'member1' called instead of 'member2'

Compiler Warning (level 1) C4351

new behavior: elements of array 'array' will be default initialized

Compiler warning (level 1) C4352

'%$I': intrinsic function already defined

Compiler Warning (level 1) C4353

nonstandard extension used: constant 0 as function expression. Use '__noop' function intrinsic instead

Compiler Warning C4355Compiler warning (level 1 and level 4) C4355

'this': used in base member initializer list

Compiler Warning (level 2) C4356

'member': static data member cannot be initialized via derived class

Compiler Warning (level 3) C4357

param array argument found in formal argument list for delegate 'delegate' ignored when generating 'function'

Compiler Warning (level 1) C4358

'operator': return type of combined delegates is not 'void'; returned value is undefined

Compiler Warning (level 3) C4359

'type': Alignment specifier is less than actual alignment ('alignment'), and will be ignored.

Compiler warning (level 2) C4362

'%$S': alignment greater than 8 bytes is not supported by CLR

Compiler Warning (level 1) C4364

#using for assembly 'assembly' previously seen at 'location'('line_number') without as_friend attribute; as_friend not applied

Compiler Warning (level 4) C4365

'expression': conversion from 'type1' to 'type2', signed/unsigned mismatch

Compiler Warning (level 4) C4366

The result of the unary 'operator' operator may be unaligned

Compiler warning (level 3) C4367

Conversion from '%$T' to '%$T' may cause datatype misalignment exception

Compiler Warning C4368

cannot define 'member' as a member of managed 'type': mixed types are not supported

Compiler Warning (level 1) C4369

'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

'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

'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

'function1': interface method will not be implemented by non-virtual method 'function2'

Compiler Warning (level 1) C4375

non-public method 'method2' does not override 'method2'

Compiler Warning (level 1) C4376

access specifier 'old_specifier:' is no longer supported: please use 'new_specifier:' instead

Compiler Warning (level 1) C4377

native types are private by default; -d1PrivateNativeTypes is deprecated

Compiler Warning (level 1) C4378

Must obtain function pointers to run initializers; consider System::ModuleHandle::ResolveMethodHandle

Compiler Warning (level 1) C4379

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) C4380

'%$S': A default constructor cannot be deprecated

Compiler Warning (level 1) C4381

'function1': interface method will not be implemented by non-public method 'function2'

Compiler Warning (level 1) C4382

throwing 'type': a type with __clrcall destructor or copy constructor can only be caught in /clr:pure module

Compiler Warning (level 1) C4383

'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

#pragma 'make_public' should only be used at global scope

Compiler warning (level 3) C4387

'%s': was considered

Compiler warning (level 4) C4388

'%$L': signed/unsigned mismatch

Compiler Warning (level 4) C4389

'operator': signed/unsigned mismatch

Compiler Warning (level 3) C4390

';': empty controlled statement found; is this the intent?

Compiler Warning (level 1) C4391

'function_signature': incorrect return type for intrinsic function, expected 'type'

Compiler Warning (level 1) C4392

'function_signature': incorrect number of arguments for intrinsic function, expected 'argument_count' arguments

Compiler Warning (level 1) C4393

'variable': const has no effect on 'literal' data member; ignored

Compiler Warning C4394

'function': per-appdomain symbol should not be marked with __declspec('dllexport')

Compiler Warning (level 1) C4395

'function': member function will be invoked on a copy of the initonly data member 'member'

Compiler warning (level 2) C4396

'%$S': the inline specifier cannot be used when a friend declaration refers to a specialization of a function template

Compiler Warning (level 1) C4397

DefaultCharSetAttribute is ignored

Compiler Warning (level 3) C4398

'variable': per-process global object might not work correctly with multiple appdomains; consider using __declspec(appdomain)

Compiler Warning (level 1) C4399

'symbol': per-process symbol should not be marked with __declspec('dllimport') when compiled with /clr:pure

Show:
© 2016 Microsoft