The following program compiles ... not g++:
This is because g++ compiles in the C++ language. And the shown program is ill-formed in the C++ language.
In particular, the problem is that the function parameter is a pointer to an array of unknown bound, but the passed argument is a pointer to an array of length 3. And latter is not implicitly convertible to the former.
So how does one get a pointer to an unspecified array in C++ anyway?!
Example:
extern int arr_ext[ ];
int arr_3 [3];
int (*ptr)[] = &arr_ext;
ptr = reinterpret_cast<int (*)[]>(&arr_3); // †
† In C++ using this reinterpreted pointer is probably technically UB in any other way than to reinterpret back as pointer to array of length 3, but if the use happens within the C library, who knows... Rules across language boundary are sometimes murky.
By contrast in C, a pointer to one type is implicitly convertible to a pointer to another compatible type. And arrays of unknown bound are compatible with an array of any size, of same element type.
There appears to be an active issue to allow same implicit conversion in C++: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4325.html#118