title: How can a declaration conflict with itself?
body: <p>This is the error I'm getting when trying to compile some code that uses taucs (not my code):</p>
  
  <pre><code>.../taucs/src/taucs.h:554: error: conflicting declaration ‘typedef struct taucs_ccs_matrix taucs_ccs_matrix’
  .../taucs/src/taucs.h:554: error: ‘taucs_ccs_matrix’ has a previous declaration as ‘typedef struct taucs_ccs_matrix taucs_ccs_matrix’
  </code></pre>
  
  <p>wat?  It is conflicting with itself?</p>
  
  <p>After I pinched myself, I created a test header and put in a conflicting definition, just to make sure I was right about this:</p>
  
  <p>In file testit.h:</p>
  
  <pre><code>#include "somethingelse.h"
  
  typedef struct
  {
    int n;
  } foobar;
  </code></pre>
  
  <p>In file somethingelse.h:</p>
  
  <pre><code>typedef struct
  {
    int n;
  } foobar;
  </code></pre>
  
  <p>Sure enough, I get:</p>
  
  <pre><code>testit.h:6: error: conflicting declaration ‘typedef struct foobar foobar’
  somethingelse.h:4: error: ‘foobar’ has a previous declaration as ‘typedef struct foobar foobar’
  </code></pre>
  
  <p>Or if I have this in testit.h:</p>
  
  <pre><code>typedef struct
  {
    int n;
  } foobar;
  
  typedef struct
  {
    int n;
  } foobar;
  
  testit.h:9: error: conflicting declaration ‘typedef struct foobar foobar’
  testit.h:4: error: ‘foobar’ has a previous declaration as ‘typedef struct foobar foobar’
  </code></pre>
  
  <p>The line number is always different -- a declaration can't conflict with itself.  I don't get it.  Anyone ever seen this?</p>