5 ms·
Point remains that gcc already has an optimizer and working backend and it's still hard to implement just the necessary changes.
by tedunangst 14y ago
Point remains that gcc already has an optimizer and working backend and it's still hard to implement just the necessary changes.
- niggler 14y agoadding C++11 features to GCC is a far more difficult undertaking than it should be because of RMS and his fear of proprietary frontends to GCC (so the plugin system, which is relatively easy to work with in LLVM, is a nightmare in GCC). That was a design decision Quote: "The concern that has long been expressed by the FSF (which owns the copyrights on GCC) is that a general plugin mechanism would make it possible for companies to traffic in binary-only GCC modules. Rather than contribute a new analysis or optimization tool - or a new language - to the community, companies might have an incentive to distribute their work separately under a restrictive license. That runs very much counter to what the FSF is trying to accomplish, so opposition from that direction is not particularly surprising." https://lwn.net/Articles/301135/ https://lwn.net/Articles/301135/
- snogglethorpe 14y ago> adding C++11 features to GCC is a far more difficult undertaking than it should be because of RMS and his fear of proprietary frontends to GCC Whatever you think of RMS's stance on plugins, or gcc's plugin system, they have little relationship with the ease or otherwise of adding C++11 features to gcc. The latter has much more to do with the difficulty of understanding the gcc C++11 front end, the difficulty of understanding the fine details of the C++11 standard sufficiently to implement it, and the amount of manpower available from people who can do both those things (or who have the time to learn). gcc certainly does have a lot of historical baggage in its code base (though this is slowly improving with time), but given its rather complete support for C++11 (on par with clang certainly, and far ahead of MS's compiler and most other proprietary C++ compilers), they're not doing so bad...
- CJefferson 14y agoNo, RMS's stance of plugins does make adding C++11 features to gcc much harder. I have a (basic) understand of clang, which is helped by the fact that there is a very clear, simple and DOCUMENTED boundary into LLVM, which I can ignore the other side of. The interface between gcc front ends and backends is none of clear, simple or documented.
- gsg 14y agoAre you suggesting that C++11 support would be implemented as a plugin, rather than by modifying the existing C++ front end? I'm not sure how seriously to take that.
- CJefferson 14y agoNo, I'm suggesting that understanding and modifying the C++ front end is much easier when the output the front-end produces is in well defined and documented output, rather than the ad-hoc and undocumented results of a gcc front-end.
- gsg 14y agoHmm? Front ends emit GENERIC, which is detailed at http://gcc.gnu.org/wiki/GenericAPI http://gcc.gnu.org/wiki/GenericAPI. I don't see what this has to do with RMS or plugins.
- CJefferson 14y agoHave you scrolled down that page? It is an extremely brief introduction. The 'types' and 'functions' sections are completely empty, and the whole page amounts to 2 examples!
- gsg 14y agoThere's more at http://gcc.gnu.org/wiki/GENERIC http://gcc.gnu.org/wiki/GENERIC: my purpose was more to point out that an interface exists than to pinpoint the exact documents for you.