title: Why does gcc allow arguments to be passed to a function defined to be with no arguments?
body: <p>I don't get why does this code compile?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  void foo() {
      printf("Hello\n");
  }
  
  int main() {
      const char *str = "bar";
      foo(str);
      return 0;
  }
  </code></pre>
  
  <p>gcc doesn't even throw a warning that I am passing too many arguments to foo(). Is this expected behavior?</p>