title: Why declaration by 'extern' doesn't work with static functions in C?
body: <p>Suppose the code:</p>
  
  <pre><code>extern int foo(void);
  
  static int foo(void)
  {
          return 0;
  }
  </code></pre>
  
  <p>Try to compile with GCC</p>
  
  <pre><code>$ gcc -Wall -std=c99 1.c 
  1.c:3:12: error: static declaration of ‘foo’ follows non-static declaration
  1.c:1:12: note: previous declaration of ‘foo’ was here
  1.c:3:12: warning: ‘foo’ defined but not used [-Wunused-function]
  </code></pre>
  
  <p>So, how can I <em>declare</em> static function?</p>