5 ms·
This is based on clang --- it's not a new compiler. <tangent> Are the any working open source C++ compilers which aren't based on gcc or clang? I know of TenD
by david-given 10y ago
This is based on clang --- it's not a new compiler.
<tangent>
Are the any working open source C++ compilers which aren't based on gcc or clang? I know of TenDRA, which appears to have ceased to exist and was always kind of incomprehensible and non-working and apparently it never got as far as STL support; there Path64, whose github page no longer contains the compiler repo; there's Open64, whose website no longer exists (although there does seem to be a daughter project, OpenUH, which did a release last year)...
Is there anything else?
- DannyBee 10y ago"Is there anything else?" For C++? No. Too hard of a language to waste phd students maintaining :) Over the years there have been a few more (openC++ is a good example, ROOT used to be one too), but they are all dead now AFAIK. One reason is that research in compilers is pretty much not in the frontends anymore. For any research still being done that uses C++ as a base, gcc/clang/llvm pretty much work fine. LLVM in particular has an IR that works for most researchers, is not hard to understand, etc. For people who want to try to build larger solutions, they usually start with C (see, for example, libfirm and friends). Commercial folks use EDG or, actually, a lot are also starting to use clang now as a frontend. (IBM was the other major company that had their own C++ parser for a longer time)
- greglindahl 10y agoBack when Path64 was highly funded, it was a nasty treadmill keeping up with g++'s ABI -- it changes every point release.
- MereInterest 10y agoBit of a side-note, but I would disagree about ROOT/CINT ever being a C++ compiler. It was an interpreter for a language that looked somewhat related to C++, if you squint quite a bit. * All variables were hoisted up to function scope. This meant that you couldn't use "int i" in one loop, and "unsigned int i" in the next. This also caused destructors to be incorrectly delayed until the end of the function call. * Use of templates required pre-compiled dictionaries for each type the template might be instantiated for. Any templates occurring in interpreted code would be silently ignored. * Incomplete standard library implementation. std::abs(long) is missing, for example. * const is silently ignored. Not entirely relevant to the current discussion, but good heavens, I am glad that monstrosity is gone.
- jlarocco 10y agoThere was OpenWatcom, but it doesn't support anything past C++98, as far as I know. There's a really high barrier to entry for C++ compilers, and between Clang, GCC, and all the proprietary compilers there's not a huge need for another one.
- userbinator 10y agoCfront? Old and probably has various license restrictions, but you can get the source for it: http://www.softwarepreservation.org/projects/c_plus_plus/index.html#cfront http://www.softwarepreservation.org/projects/c_plus_plus/ind... I think the reason why there are so many C/C-like compilers, but very few C++ (I personally don't know of any open-source ones besides gcc and clang) is due to the complexity of the language; C is simple enough that a single person can easily write a compiler for one in a short time and have it compile both itself and large quantities of existing standard and not-so-standard code: https://news.ycombinator.com/item?id=10731002 https://news.ycombinator.com/item?id=10731002 https://news.ycombinator.com/item?id=11903674 https://news.ycombinator.com/item?id=11903674 https://news.ycombinator.com/item?id=9125912 https://news.ycombinator.com/item?id=9125912 In contrast, C++ is at least an order of magnitude more complex, with far more features that need to be working to get to something which could usefully be considered 'C++'. For example, templates are pretty integral to the language and implementing them correctly is not trivial. The number of people who can write a whole C compiler, while relatively many, is still a tiny fraction of all programmers. (I do wish there were more, since I personally think the concepts aren't so hard once you see the essence of the tiny compilers like tcc or C4.) And a much tinier fraction of them will want to try writing one for even a subset of C++.
- cmrdporcupine 10y agoNot at all open source, but Intel's ICC is free.
- pjmlp 10y agoIntel makes use of EDG as far as I am aware.
- greglindahl 10y agoNot open source, and actually it's not free, either. People sure think it is, but that's only for students at degree-granting institutions, and people working on open-source code who are not being paid. Academic researchers can get a free library license, but not a compiler license.
- int_19h 10y agoDitto Digital Mars C++ (nee Symantec C++, nee Zortech C++). But as I recall, like most other "alternative" C++ compilers, it's also stuck in the C++03 land.
- WalterBright 10y agoThat's because I work on D now :-)
- PeCaN 10y agoWhich happens to have really great compile times, in spite of using even more metaprogramming than C++. Thank you for your work! I was pretty skeptical of D for a while, mainly because of the GC, but I've started to take a liking to it. It's a very useful tool.
- WalterBright 10y agoI've been slowly converting my older C/C++ code still in use into D. Next up is the dmd back end!
- 10y ago
- static_noise 10y ago> This is based on clang --- it's not a new compiler. This is good. Apparently it improves compile speed by a factor of 2..10 for a wide use range without compromising on the output quality. For many C++ developers it will be like a nitro injection.
- shmerl 10y agoPathScale / Ekopath was supposed to be opened up years ago according to its owners, but it seems like it never happened. https://en.wikipedia.org/wiki/PathScale https://en.wikipedia.org/wiki/PathScale Sounds like it was more talk than real intention.
- greglindahl 10y agoWe complied 100% with the GPL, and, Path64 includes 100% of the code, including the parts that didn't have to be released under the GPL.
- shmerl 10y agoSo where is the source published? I couldn't find any such information on the official site. This doesn't have the compiler: https://github.com/path64 https://github.com/path64
- greglindahl 10y agoWhile we were shipping the compiler at the original PathScale, the source was distributed to everyone we distributed a copy to (GPLv2 clause 3a). I'm not sure why you'd mention github, given that they didn't exist yet. And I have no idea what you mean by "official site" when we're talking about a company that ceased business in 2006. p.s. if you wonder why I'm so vehement about this topic, it's because you're basically accusing real people of being unethical based on your inability to find things now that we were required to give away in the past.
- shmerl 10y agoCeased business in 2006? The claims about opening up the compiler were made in 2011. http://www.pathscale.com/ekopath4-open-source-announcement http://www.pathscale.com/ekopath4-open-source-announcement Either you are talking about something else completely, or I'm really confused.
- 10y ago