title: Why does flowing off the end of a non-void function without returning a value not produce a compiler error?
body: <p>Ever since I realized many years ago, that this doesn't produce an error by default (in GCC at least), I've always wondered why?</p>
  
  <p>I understand that you can issue compiler flags to produce a warning, but shouldn't it always be an error? Why does it make sense for a non-void function not returning a value to be valid?</p>
  
  <p>An example as requested in the comments:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int stringSize()
  {
  }
  
  int main()
  {
      char cstring[5];
      printf( "the last char is: %c\n", cstring[stringSize()-1] ); 
      return 0;
  }
  </code></pre>
  
  <p>...compiles.</p>