title: What are the implications of having an "implicit declaration of function" warning in C?
body: <p>As the question states, what exactly are the implications of having the 'implicit declaration of function' warning?  We just cranked up the warning flags on gcc and found quite a few instances of these warnings and I'm curious what type of problems this may have caused prior to fixing them?  </p>
  
  <p>Also, why is this a warning and not an error. How is gcc even able to successfully link this executable?  As you can see in the example below, the executable functions as expected.</p>
  
  <p>Take the following two files for example:</p>
  
  <h3>file1.c</h3>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(void)
  {
     funcA();
     return 0;
  }
  </code></pre>
  
  <h3>file2.c</h3>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  void funcA(void)
  {
     puts("hello world");
  }
  </code></pre>
  
  <h3>Compile &amp; Output</h3>
  
  <pre><code>$ gcc -Wall -Wextra -c file1.c file2.c
  file1.c: In function 'main':
  file1.c:3: warning: implicit declaration of function 'funcA'
  
  $ gcc -Wall -Wextra file1.o file2.o -o test.exe
  $ ./test.exe
  hello world
  </code></pre>