title: Omission of function declarations
body: <p>Are there any circumstances in which it is acceptable to omit function declarations from source files? I have a C project which will not compile, and I do not know why. As far as I can determine the compiler (GCC 4.4.1) cannot find the declaration of the 'sepData' typedef when it gets to the declaration of the function 'sysData' in 'system.h'.</p>
  
  <p>From sepsis.h</p>
  
  <pre><code>typedef struct {
      int16 intensity;
      int16 offset;
  } sepData;
  </code></pre>
  
  <p>From sepsis.c</p>
  
  <pre><code>sepData sepR, sepIR;
  </code></pre>
  
  <p>From system.h</p>
  
  <pre><code>void sysData(sepData *sepR, sepData *sepIR);
  </code></pre>
  
  <p>From system.c</p>
  
  <pre><code>#include "system.h"
  #include "sepsis.h"
  
  extern sepData sepR, sepIR;
  
  void sysData(sepData *sepR, sepData *sepIR)
  {
  }
  </code></pre>
  
  <p>If I remove the declaration of 'sysData' from 'system.h', then the project compiles without error. Not knowing a great deal about C, I thought that including such declarations was compulsory. Is anyone able to explain what is going on here?</p>