Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
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.

Compiler Error C2467

Error Message

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:

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

Community Additions

ADD
Show:
© 2015 Microsoft