News for hackers. Stuff that matters.
Re:Linus on compiler warnings and code reviews by acconsta on Wednesday September 23, 2015 @08:22PM (#10269161)
You can pass structs by value. Why not arrays?
Re:Linus on compiler warnings and code reviews by 36erhefg on Wednesday September 23, 2015 @08:44PM (#10269224)
Your answer is merely a simple online search away.
Re:Linus on compiler warnings and code reviews by acconsta on Wednesday September 23, 2015 @09:09PM (#10269283)
What's weird is five hours after asking that question, no one has provided a reasonable explanation of why C requires arrays to become pointers on function boundaries.

My "online search" found Walter Bright, who knows a thing or two about C compilers, wondering the same thing:

https://news.ycombinator.com/item?id=7572011

Re:Linus on compiler warnings and code reviews by 36erhefg on Wednesday September 23, 2015 @11:36PM (#10269698)
Improve your searching capabilities.

https://programmers.stackexchange.com/questions/245602/why-c...

( https://stackoverflow.com/questions/7454990/why-cant-we-pass... )

And partially this thread.

As for Walter; Stop using C like you want it to be used, and instead how it is meant to be used. The article takes a strawman position. Anyone who takes their time and learns C, knows that arrays decay.

Re:Linus on compiler warnings and code reviews by acconsta on Thursday September 24, 2015 @09:05PM (#10275889)
So it comes down to historical compatibility with B? Wow.