title: Forward declarations of unnamed struct
body: <p><strong>Bounty question:</strong> So, these two <code>Foo</code>s aren't the same thing. Fine. The second form is given in a library. <em>How do I forward-declare it given that I can't change it?</em></p>
  
  <hr>
  
  <p>I always thought C and C++ allowed repeated declarations provided that there were no repeated definitions. Then I came across this problem when trying to write C++ code which extends a C library.</p>
  
  <pre><code>struct Foo;
  typedef struct {} Foo;
  </code></pre>
  
  <p>This gives the following error:</p>
  
  <blockquote>
    <p>'struct Foo' has a previous declaration as 'struct Foo'</p>
  </blockquote>
  
  <p>I want to forward-declare, darn it! What's wrong here?</p>