Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 779 Bytes

compiler-warning-level-4-c4210.md

File metadata and controls

29 lines (24 loc) · 779 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 4) C4210
Compiler Warning (level 4) C4210
11/04/2016
C4210
C4210
f8600adf-dfe2-4022-a37a-3d4997641dfd

Compiler Warning (level 4) C4210

nonstandard extension used : function given file scope

With the default Microsoft extensions (/Ze), function declarations have file scope.

// C4210.c
// compile with: /W4 /c
void func1()
{
   extern int func2( double );   // C4210 expected
}

int main()
{
   func2( 4 );   //  /Ze passes 4 as type double
}                //  /Za passes 4 as type int

This extension can prevent your code from being portable to other compilers.