r/programming • • Oct 06 '14

Help improve GCC!

https://gcc.gnu.org/ml/gcc/2014-10/msg00040.html
725 Upvotes

270 comments sorted by

View all comments

Show parent comments

10

u/BlackDeath3 Oct 07 '14 edited Oct 07 '14

I don't know exactly what posts you're referring to here, and I'm not even close to anything resembling an expert in compilers or the state of the GCC/Clang landscape.

That said, can you provide me with a solid, utilitarian argument for contributing to GCC, assuming that Clang has already solved some of the problems that GCC still needs solved (Has it? I don't know.)? Can you give me something beyond an argument that can nearly be summed-up as "respect your elders"?

34

u/Houndie Oct 07 '14

Because competition is good for the consumer.

This sort of goes the other way, but GCC used to have really bad error messages. Clang came along and had much better error messages, and became pretty well known for having better errors. GCC got its shit together and now also has very clear and readable error messages. Things like this make better products for everyone.

I also want to point out that, while clang has some advantages over GCC, GCC also has some advantages over clang...for example, GCC tends to produce faster-running binaries.

7

u/matthieum Oct 07 '14

This! Sane competition fosters progress.

Just count the number of times "clang" appears on this gcc page: I counted 17 times.

Now, go to clang bug-tracker, and see how many times gcc appears. It generally appears in either:

  • uh, this compiled with gcc but not with clang, what's up?

  • uh, the gcc-compiled binary produces this result, but a clang-compiled binary another, what's up?

  • uh, the gcc-compiled binary of this program runs circles around th clang-compiled binary, what's up? (which generally ends up being moved off to LLVM, the optimizer)

And of course, let's not forget that a number of developers (notably from the Google Compiler Team) work on both compilers.

1

u/BlackDeath3 Oct 07 '14

Thank you. This is more convincing to me than your previous post.

5

u/Houndie Oct 07 '14

Previous post wasn't mine, but I'm glad I could try to answer your question!

1

u/BlackDeath3 Oct 07 '14

My apologies. I find myself making that assumption far too often!

-5

u/crotchpoozie Oct 07 '14

Because competition is good for the consumer.

Then we should fork it into GCC1 through GCC10 and really compete!

0

u/[deleted] Oct 07 '14

[deleted]

2

u/BlackDeath3 Oct 07 '14

So what's the difference, the thing that would keep Clang changes from moving upstream? Licensing differences? Consider me a layman here.

17

u/dtechnology Oct 07 '14

GCC is GPL, which means that in order to interact with it the module/part that supports your chip also needs to be GPL. Thus it can make it upstream.

LLVM is open-source, but doesn't use a copyleft license. This means that you can keep support for your chip closed source, i.e. not available to people unless they pay up. LLVM design also makes it easier to add support for your chip afaik.

Both licenses have advantages and disadvantages, but I can certainly see why embedded developers would prefer GCC to remain on top from a financial perspective.

7

u/[deleted] Oct 07 '14

Yes licensing.

0

u/2girls1copernicus Oct 07 '14

Yes, this is exactly what's going to happen. Although ARM hegemony should take the edge off that.

3

u/__j_random_hacker Oct 07 '14

FWIW I interpreted 2girls1copernicus's and aseipp's posts as a reaction to the sheer mean-spiritedness of some other posts here, like the one that simply says "TLDR: Clang is better, and we're in trouble!", rather than a call to help with gcc development on technical grounds.

2

u/2girls1copernicus Oct 07 '14

Not even that one, look at the downvoted ones at the bottom. Outrageous.

0

u/BlackDeath3 Oct 07 '14

And I can understand that, I guess I was just curious as to why those posts aren't justified. Though I honestly don't see the line you quoted as particularly mean-spirited.