Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 753 Bytes

compiler-warning-level-4-c4220.md

File metadata and controls

30 lines (23 loc) · 753 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 4) C4220
Compiler Warning (level 4) C4220
11/04/2016
C4220
C4220
aba18868-825f-4763-9af6-3296406a80e4

Compiler Warning (level 4) C4220

varargs matches remaining parameters

Under the default Microsoft extensions (/Ze), a pointer to a function matches a pointer to a function with similar, but variable, arguments.

Example

// C4220.c
// compile with: /W4

int ( *pFunc1) ( int a, ... );
int ( *pFunc2) ( int a, int b);

int main()
{
   if ( pFunc1 != pFunc2 ) {};  // C4220
}

Such pointers do not match under ANSI compatibility (/Za).