title: Does "int (*)[]" decay into "int **" in a function parameter?
body: <p>I posted this <a href="https://softwareengineering.stackexchange.com/questions/269648/int-vs-int-n-vs-int-n-in-functions-parameters-which-one-do-you-think-i/269660?noredirect=1#comment549439_269660">question</a> on programmers.stackexchange earlier today. I have always assumed that <code>int (*)[]</code> does <strong>not</strong> decay into <code>int **</code> in function parameters but I got multiple responses to my question that suggested that it does.</p>
  
  <p>I have used <code>int (*)[]</code> heavily in my function parameters but now I have become really confused.</p>
  
  <p>When I compile this function using <code>gcc -std=c99 -pedantic -Wall</code></p>
  
  <pre><code>void function(int (*a)[])
  {
      sizeof(*a);
  }
  </code></pre>
  
  <p>I get this error message:</p>
  
  <pre><code>c99 -Wall -pedantic -c main.c -o main.o
  main.c: In function ‘function’:
  main.c:3:11: error: invalid application of ‘sizeof’ to incomplete type ‘int[]’ 
  make: *** [main.o] Error 1
  </code></pre>
  
  <p>Which suggests that <code>*a</code> has the type <code>int []</code> and not <code>int *</code>.</p>
  
  <p>Can someone explain if things like <code>int (*)[]</code> decays into <code>int **</code> in function parameters and give me some reference (from the standard documents perhaps) that proves why it is so.</p>