https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50584
Serg Iv <sergei.ivn+bugzilla at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sergei.ivn+bugzilla at gmail dot c | |om --- Comment #7 from Serg Iv <sergei.ivn+bugzilla at gmail dot com> --- Some excerpts from the C11 standard: /----- If the keyword static also appears within the [ and ] of the array type derivation, then for each call to the function, the value of the corresponding actual argument shall provide access to the first element of an array with at least as many elements as specified by the size expression. \----- And another one: /----- The following are all compatible function prototype declarators: [..snip..] void f(double a[restrict 3][5]); void f(double a[restrict static 3][5]); (Note that the last declaration also specifies that the argument corresponding to a in any call to f must be a non-null pointer to the first of at least three arrays of 5 doubles, which the others do not.) \----- I'm not sure about warnings (the meaning of the word "shall" is unclear for me), but IMO according to the standard null-pointers should issue an *error*.