Compiler Error C2467
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 Error C2467

illegal declaration of anonymous 'user-defined-type'

A nested user-defined type was declared. This is an error when compiling C source code with the ANSI compatibility option (/Za) enabled.

The following sample generates C2467:

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