4 ms·
No, this really is true, RMS wanted to make sure the GCC front ends and back ends could not be seperated, because he didn't want people using the front end for
by CJefferson 12y ago
No, this really is true, RMS wanted to make sure the GCC front ends and back ends could not be seperated, because he didn't want people using the front end for other projects. This has (in my opinion) hugely set back open source software, and is why everyone new uses clang for any situation where they want to parse C++ -- because g++ is purposefully designed to make it painful to just get a C++ parse tree.
Here are the words from the man himself: https://gcc.gnu.org/ml/gcc/2005-01/msg00008.html https://gcc.gnu.org/ml/gcc/2005-01/msg00008.html
- riffraff 12y agomaking two parts not separated does not imply the code is obfuscated. Also, the gcc maintainers have in the meantime moved away from that policy, IIRC.
- deng 12y agoYour information is old. You can easily access the C++ parse tree by writing a gcc plugin. This is possible since gcc 4.5 or so, but somehow nobody really noticed since everyone just stared at the new kid on the block. You might say the tree itself isn't easy to deal with, which is true, but that is just because the code is very old and things were done differently back then (hint: union of structs). There is even a very nice tutorial which explains how to do this: http://www.codesynthesis.com/~boris/blog/2010/05/03/parsing-cxx-with-gcc-plugin-part-1/ http://www.codesynthesis.com/~boris/blog/2010/05/03/parsing-...
- deleted 12y ago[deleted]