编译器错误 C2467

匿名“user-defined-type”的声明非法

声明了嵌套用户定义类型。 在启用 ANSI 兼容性选项 (/Za) 的情况下编译 C 源代码时,会出现此错误。

以下示例生成 C2467:

//C2467.c
// compile with: /Za
int main() {
   struct X {
      union { int i; };   // C2467, nested declaration
   };
}