News for hackers. Stuff that matters.
Re:Linus on compiler warnings and code reviews by acconsta on Wednesday September 23, 2015 @04:02PM (#10267747)
But the size of C89 arrays is fixed and known at compile time. Why would the length need to be passed?
Re:Linus on compiler warnings and code reviews by klodolph on Wednesday September 23, 2015 @04:51PM (#10268094)
It's not necessarily known by the caller, since the array might be declared with an unspecified size and defined in a different translation unit.
Re:Linus on compiler warnings and code reviews by acconsta on Wednesday September 23, 2015 @05:54PM (#10268518)
"might" is the key word there though. What if the array has a statically known size, like the code sample in the email?

I suppose it could just be for consistency.