Compiler Warning (level 4) C4214

 

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) C4214.

nonstandard extension used : bit field types other than int

With the default Microsoft extensions (/Ze), bitfield structure members can be of any integer type.

// C4214.c  
// compile with: /W4  
struct bitfields  
{  
   unsigned short j:4;  // C4214  
};  
  
int main()  
{  
}  

Such bit fields are invalid under ANSI compatibility (/Za).

Show: