According to gcc warnings, a pointer to int[] can be assigned the address of an
int[3], but not if the variable is a struct member:
int main() {
int array[3];
int (*ptr)[];
struct { int (*ptr)[]; } st;
ptr = &array; // fine
st.ptr = &array; // warning: assignment from incompatible pointer type
}
--
Summary: incompatible pointer type with pointer to array as a
struct member
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: anders at kaseorg dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36432