Compiler Warning (level 4) C4207

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Warning (level 4) C4207.

nonstandard extension used : extended initializer form

With Microsoft extensions (/Ze), you can initialize an unsized array of char using a string within braces.

// C4207.c  
// compile with: /W4  
char c[] = { 'a', 'b', "cdefg" }; // C4207  
  
int main()  
{  
}  

Such initializations are invalid under ANSI compatibility (/Za).

Show: