title: C++ Warning: anonymous type with no linkage used to declare variable
body: <p>I see this warning message when compiling (gcc 4.6.3, ubuntu) the example:</p>
  
  <pre><code>struct {
  } a;
  
  int main() 
  {
  }
  
  
  warning: anonymous type with no linkage used to declare variable ‘&lt;anonymous struct&gt; a’ with linkage [enabled by default].
  </code></pre>
  
  <p>GCC does not give this warning. Only G++ does. </p>
  
  <p>Adding <strong><em>static</em></strong> clears the warning:</p>
  
  <pre><code>static struct {
  } a;
  </code></pre>
  
  <p>I couldn't figure out what it means, expecially why <code>type</code>is related to <code>linkage</code>. I thought linkage depends on where and how a variable is declared, but not on the type of the variable itself.</p>