Hacker News new | ask | show | jobs
by rjek 4844 days ago
The compiler can't know at compile time with a naked pointer like it can with an array. [static 1] is handy to say it must not explicitly be NULL, as if it were optional, however.
1 comments

Yes, but I expected some kind of "You're passing a pointer as an array of size n. I can't check the size, but you should make sure you've checked it".
I can't imagine that would be anything but noise. 99% of my function calls have pointers passed through, not arrays.