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
{{ message }}
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Typechecking in C treats a parameter with the type array of T as through it has the type "pointer to T". It does not enforce at function calls that any actual arguments have the size required by T.
This can easily result in incorrect code, For the function g,
int g(int input[10]) { ... }
there is no guarantee that g is passed a pointer to a 10-element array. The following incorrect code will typecheck.
int f() {
int myarr[3];
g(myarr, ...);
}
With the new array types, checking of bounds declarations should flag this as an error. The description of bounds declaration checking needs to be updated to handle parameters with array types specially.