title: Writing C function parameter types after name list, and no type for some parameters
body: <p>I've read some, to me, peculiar C-code while studying some examples in the book The Unix Programming Environment (1983). </p>
  
  <p>As a curiosity I wanted to find out more about the, let's call it "style". The point of interest here is the line just below <code>int main(argc, argv)</code> </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(argc, argv)
       char *argv[];
  {
      printf("%s\n", argv[0]);
      return 0;
  }
  </code></pre>
  
  <p>In my investigation I've found that compiling the above code with the flags <code>-Wall -pedantic -ansi</code> works without any warnings, and replacing <code>-ansi</code> with the more recent <code>-std=c99</code> (or <code>c11</code>, with <code>gcc</code> and <code>cc</code>) only warns about <code>argc</code> defaulting to <code>int</code>.</p>
  
  <p>I perused the old C89 standard trying to find references to this particular way of writing
  but didn't find anything on my own so I defer to the greater knowledge of the collective.</p>
  
  <p>Hence the question, from when does this esoteric writing stem and possibly why is it still allowed (legacy reasons?)</p>