Compiler Warning (levels 2 and 4) C4200
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Compiler Warning (levels 2 and 4) C4200

Error Message

nonstandard extension used : zero-sized array in struct/union

A structure or union contains an array with zero size.

Level-2 warning when compiling a C++ file and a Level-4 warning when compiling a C file.


// C4200.cpp
// compile with: /W2
#include <stdio.h>
struct A {
int a[0];  // C4200
int main() {
© 2015 Microsoft