News for hackers. Stuff that matters.
Re:Linus on compiler warnings and code reviews by uxcn on Wednesday September 23, 2015 @05:15PM (#10268287)
It avoids stepping on memory elsewhere in the program though. My personal preference for C99 and above is to pass the length as a parameter.

    int do_stuff(size_t len, int64_t arr[len]);
It still suffers from the pointer decay problem, but it at least forces whoever is reading/writing the code to acknowledge the length.

There are no comments on this comment yet.