title: Effects of the extern keyword on C functions
body: <p>In C, I did not notice any effect of the <code>extern</code> keyword used before function declaration.
  At first, I thought that when defining <code>extern int f();</code> in a single file <strong>forces</strong> you to implement it outside of the file's scope.  However I found out that both:</p>
  
  <pre><code>extern int f();
  int f() {return 0;}
  </code></pre>
  
  <p>and</p>
  
  <pre><code>extern int f() {return 0;}
  </code></pre>
  
  <p>compile just fine, with no warnings from gcc. I used <code>gcc -Wall -ansi</code>; it wouldn't even accept <code>//</code> comments.</p>
  
  <p>Are there any effects for using <code>extern</code> <strong>before function definitions</strong>? Or is it just an optional keyword with no side effects for functions.</p>
  
  <p>In the latter case I don't understand why did the standard designers chose to litter the grammar with superfluous keywords.</p>
  
  <p><strong>EDIT:</strong> To clarify, I know there's usage for <code>extern</code> in variables, but I'm only asking about <code>extern</code> in <strong>functions</strong>.</p>