title: Function prototyping in C
body: <p>Today Clang, trying to compile a program, gave me kinda an strange message. I'm not really experienced with C, so I might be doing something wrong, but the code that I actually tried is this:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int sum(a,b);
  
  int main ()
  {
      printf(sum(1,2));
      return 0;
  }
  
  int sum (int a, int b)
  {
      return a + b;
  }
  </code></pre>
  
  <p>As you have probably noticed, when declaring the function 'sum', I'm not including the param. type, so an error is expected, but the actual message Clang gives me is this:</p>
  
  <pre><code>ind.c:4:9: error: a parameter list without types is only allowed in a function definition
  int sum(a,b);
          ^
  ind.c:12:5: error: redefinition of 'sum' as different kind of symbol
  int sum (int a, int b)
      ^
  ind.c:4:5: note: previous definition is here
  int sum(a,b);
      ^
  2 errors generated.
  </code></pre>
  
  <p>What does Clang mean when it says it is only allowed in function definitions? Isn't <code>int sum(a,b);</code> a function definition?</p>