The standard states in 6.7.6.3:
Declaring a parameter as a '' type array must be adjusted to a '' Qualified pointer to a type, where type qualifiers (if any) are those specified in the [and] output of the array type. If the static keyword also appears in [and] the type of the output array , then for each function call the value of the corresponding actual argument should provide access to the first element of the array with at least as many elements as specified in size.
This is a feature introduced in C99. So there you have it: some_array must have at least 7 elements.
As the saying goes, there cannot be a new standard without a new use for the static .
cnicutar
source share