Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

Compiler Warning (level 4) C4210

Error Message

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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.