title: Unnamed classes
body: <p>Motivated by the <a href="https://stackoverflow.com/questions/3606902/cant-make-sense-of-large-integer-struct">discussion</a></p>
  
  <p>The grammar for C++ classes is defined as </p>
  
  <p><code>class-key identifier *[opt]* base-clause *[opt]*</code>  (Italics are mine)</p>
  
  <p>This to me means that the class name is option and we can have unnamed classes in C++.</p>
  
  <p>So, is the following well-formed?</p>
  
  <pre><code>struct X{
     struct{
        int x;
        int y;
     };
  };
  
  int main(){}
  </code></pre>
  
  <blockquote>
    <p>VS: error C2467: illegal declaration
    of anonymous 'struct'</p>
    
    <p>Comeau online: error: declaration does
    not declare anything
         struct{</p>
    
    <p>GCC(ideone): Compiles fine</p>
  </blockquote>
  
  <p>Any thoughts?</p>