I posted this question on programmers.stackexchange earlier today. I have always assumed that
gcc -std=c99 -pedantic -Wall
void function(int (*a))
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
Only array types converted to pointer to its first element when passed to a function.
a is of type pointer to an array of
int, i.e, it is of pointer type and therefore no conversion.
For the prototype
void foo(int a);
compiler interpret it as
void foo(int (*a));
a is of array type.
int a will never be converted to
int **a. That said, the second para in that answer is wrong and misleading.
As a function parameter,
int *a is equivalent to
int ** this is because
a is of array type .