7 ms·
Maybe I'm weird, but I'm still enthused about GCC. I mean come on, it's a free high-quality C compiler for almost any platform you can dig up! That's just awes
by unwind 12y ago
Maybe I'm weird, but I'm still enthused about GCC.
I mean come on, it's a free high-quality C compiler for almost any platform you can dig up! That's just awesome! C hasn't died or gone away since the 1980s, and being able to compile C for such a wide range of processors and platforms is great, in my opinion.
- jordigh 12y ago> Maybe I'm weird, but I'm still enthused about GCC. I'm just as weird as you. I am hoping to be able to devote some time this year to cross-pollinate with David Malcolm's work to get libgccjit working on GNU Octave: https://savannah.gnu.org/patch/index.php?8395 https://savannah.gnu.org/patch/index.php?8395
- gerbilly 12y agoI'm weird too, and I'd add that I think Autoconf is also awesome.
- jordigh 12y agoI think the idea of autoconf is great (test for features, not for versions). The implementation in m4 is sadness. It's possible to do autoconf-style checks in other build systems, but not as easily. I don't know why most build systems seem to ignore the wisdom of autoconf.
- kevin_thibedeau 12y agom4 is actually pretty awesome when fulfilling its original purpose of adding macros to programming languages. Certainly it's not hygienic and is a pain to debug but it can work wonders to bypass language limitations especially when dealing with assembly code.
- lmm 12y agoLLVM seems to be where the interesting action is these days, I think mostly because it's adopted a superior modular design. GCC's technical design was compromised by RMS' desire to keep it tightly coupled for licensing reasons, and in the past few years the pain of that has really started to be fault. Which is somewhat ironic considering how the free software movement started.
- omega_rythm 12y agoGcc code is arcane: it relies heavily on macros to define some kind of DSL for the compiler backends (check out the .def files), but if you want to contribute seriously you need to learn that DSL and how it works behind the scene somewhat, whereas llvm is C++. That being said, it's an interesting experience to dive into that code.
- deleted 12y ago[deleted]
- 1amzave 12y agoAs opposed to LLVM's tblgen?
- nhaehnle 12y agoI give you: https://github.com/llvm-mirror/llvm/blob/master/lib/Target/X86/X86InstrAVX512.td https://github.com/llvm-mirror/llvm/blob/master/lib/Target/X... I agree with you that gcc is much less pleasant than LLVM+Clang, but to say that LLVM is better becauses it uses C++ everywhere is simply incorrect. In fact, using this kind of DSL for backend definitions is good design.
- sillysaurus3 12y agoThat looks very readable. Maybe the gripe was that GCC isn't readable? I don't know, I haven't looked at GCC code.
- david-given 12y agoThe LLVM DSL engine is really annoying to use, mainly because the pattern matching engine is pretty simple, and it's possible to express patterns in the DSL language which the pattern matching engine is unable to actually match. Until you know where the limits are it's really frustrating; you write a pattern which should work and the compiler blows stack or produces an impenetrable internal error because the pattern matcher has given up or gone into a working loop. A large part of any LLVM backend is actually custom C++ code for matching and expanding patterns which the pattern matcher either can't or is unwilling to do (e.g. custom backend-specific DAG nodes). I direct you at this file: https://github.com/llvm-mirror/llvm/blob/master/lib/Target/X86/X86ISelLowering.cpp https://github.com/llvm-mirror/llvm/blob/master/lib/Target/X... github will give you a warning before loading it because that single C++ source file is over a megabyte...
- ChuckMcM 12y agoIt's not that you are weird you just haven't looked too closely at clang :-) On a more serious note, the whole "I feel <x> about GCC" has a certain challenge about it as GCC isn't a compiler so much as it is a very long story. I think I have pretty much had every emotion you can have with respect to GCC, whether it was admiration for supporting an obscure platform, hatred for a gratuitous interdependency on a library, or respect for a particularly clean compilation. But over its life it has gone in many directions and gone through many theories of how a compiler should be written, and some of those chapters are very dark indeed. I was also amused that there is a link chain to the 'kissed a girl' email that Bryan Cantrill (CTO of Joyent) wrote back in 1996. Proof that the Internet really really doesn't like sarcasm.
- tenfingers 12y agoAnother reason to be enthusiastic about GCC is support for OpenMP.