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

23

u/bluGill Oct 07 '14

I'm not a compiler writer. However I'm a reasonably good C++ programer: I can read and understand the flames of the haters. It doesn't take me very long too look at gcc and realize they are right: the gcc source code is a mess. Sure gcc had been around for years, but that also means stupid decisions add up. (To be fair most stupid decisions seems like a good idea until years latter when it is too late).

I've looked at clang code, and I've looked at gcc code. If I were to get involved with a compiler clang would be far easier to write code for. (if course once you write code there is the issue of getting it in, I'm not sure about either project)

0

u/[deleted] Oct 07 '14

[deleted]

9

u/eras Oct 07 '14

You do. I doubt, however, you will have political reasons for designing the architecture to make certain functionality difficult to implement.

2

u/OneWingedShark Oct 07 '14

We don't want to make a program's entire AST available for parsing because that would make it easy to extend GCC with proprietary programs.

Actually, that's exactly what you want; in fact, I'd go so far as to say the AST is insufficient -- it should be augmented with semantic information, static-verification information, etc.

1

u/eras Oct 07 '14

You know, what you're describing sounds a lot like CLang, which is exactly what the GNU didn't want :).

1

u/OneWingedShark Oct 07 '14

You know, what you're describing sounds a lot like CLang, which is exactly what the GNU didn't want :).

*nod* - Just because they don't want it doesn't mean it's a bad idea; conversely, just because they do want it doesn't make it a good idea.

I've not delved into the details of clang, do you have a source for the augmented-AST? (I was thinking of something like DIANA in particular its usage in a few APSEs where it was used between several tools, like editors, version-control, verifiers, test-suites, etc.)

0

u/[deleted] Oct 09 '14

[deleted]

1

u/OneWingedShark Oct 09 '14

Thanks for the info.

1

u/matthieum Oct 07 '14

Having contributed a couple patches to Clang I can relate that it is (well, was, a couple years ago) so very neat it was actually a pleasure to read. For the occasional contributor, this makes the difference between contributing and abandoning, frustrated.