Here is v2 of my series to simplify libcc1 through the use of C++11 constructs.
v1 is here: https://gcc.gnu.org/pipermail/gcc-patches/2021-January/562668.html I never pinged it because I'd sent it in the wrong stage. As with v1, this brings libcc1 much closer to how I originally wanted it to work. Back then, C++11 couldn't be used, so some things had to be written in a verbose way. C++11 brings variadic templates, which make it possible to simplify this code. This version of the series brings more improvements. The plugin for the C++ compiler was apparently written by copying much of the C compiler code. However, the original design was to unify these, and this series eliminates much of the duplication. This version also removes some manual memory management; typically in favor of either unique_ptr or vector, but also via custom 'deleter' classes for the rpc code. Finally, a couple of minor bugs are fixed along the way. I built and tested this against git GDB on x86-64 Fedora 32. Note that the C++ plugin currently does not for git GCC -- it crashes. This series doesn't make it worse (it may slightly change the reported failures), but nor does it improve it. Tom