by shift_reset · 7y ago · 0 comments
void func(int x[static 10]);
must be called with an argument that is a pointer to the start of a big enough array of int. I can't get recent GCC or Clang to warn on violations of this, though. void foo(int *p)
{
func(p);
}
How can the compiler know if `p` points to space for 10 integers?