title: extern declaration and function definition both in the same file
body: <p>I was just browsing through <code>gcc</code> source files. In <code>gcc.c</code>, I found something like</p>
  
  <pre><code>extern int main (int, char **);
  
  int
  main (int argc, char **argv)
  {
  </code></pre>
  
  <p>Now my doubt is <code>extern</code> is to tell the compiler that the particular function is not in this file but will be found somewhere else in the project. But here, definition of <code>main</code> is immediately after the <code>extern</code> declaration. What purpose is the <code>extern</code> declaration serving then? </p>
  
  <p>It seems like, in this specific example,  <code>extern</code> seems to be behaving like <code>export</code> that we use in assembly, wherin we export a particular symbol outside of the module</p>
  
  <p>Any ideas?     </p>