title: anonymous union can only have non-static data members GCC c++
body: <p>I have some C code and using the GCC compiler. </p>
  
  <p>The code has some nested types inside an anonymous union:</p>
  
  <pre><code>struct ab {
      int a;
      int b;
      union {
          int *c;
          int *d;
          struct f {
             int *c;
             int *d;
          };
          struct e {
              int *c;
              int *d;
          };
      };
  };
  </code></pre>
  
  <p>I am getting this error:</p>
  
  <pre><code>Error: 'struct ab::&lt;anonymous union&gt;::f' invalid; an anonymous union 
  can only have non-static data members.
  </code></pre>
  
  <p>Can someone give further explanation why this error is happening?</p>