Y
Hacker News
new
|
ask
|
show
|
jobs
by
dependenttypes
2098 days ago
void f(size_t n, int v[n]) is valid C.
1 comments
Koshkin
2098 days ago
Semantically though, the second argument is still just a naked pointer.
link
david2ndaccount
2097 days ago
That’s why you use the proper declaration of
void f(size_t n, int (*v)[n])
instead.
link
dependenttypes
2097 days ago
Is it? I am pretty sure that v[x] where x >= n is UB.
link