You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C99 §6.7.5.3-7 states that static in an array parameter declaration means
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.
Thus the following should be accepted:
int foo5(int t[static 1]) {
return t[0];
}
int foo6(int t[const static 1]) {
return t[0];
}
I suspect the simplest is to ignore this keyword. (Technically, one could use it to convey semantic information that the area pointed to should be accessible for a certain length, thus allowing some optimizations such as speculatively loading values, but this would require quite a bit of work…)
The text was updated successfully, but these errors were encountered:
C99 §6.7.5.3-7 states that
static
in an array parameter declaration meansThus the following should be accepted:
I suspect the simplest is to ignore this keyword. (Technically, one could use it to convey semantic information that the area pointed to should be accessible for a certain length, thus allowing some optimizations such as speculatively loading values, but this would require quite a bit of work…)
The text was updated successfully, but these errors were encountered: