Thanks for detailed testing. My guess is that the largest remaining slowdown is that C::B matches every line of output against multiple regexes. To improve that, we probably would have to try integrating a faster implementation (if one exists). The library
re2 claims to do that, but I have not tested. However, I am not sure if it is worth the effort to integrate. A compiler spitting out thousands of warnings generally means you have bigger problems...
I recall reading somewhere that piped processes in wxWidgets are slow to handle large volumes of text, so that might also be related.
By the way, when using wx28 (they fixed it in wx30, but apparently did not backport) with gcc4.8+, I usually add
-Wno-unused-local-typedefs to global options, so that other warnings are not drowned out. Possibly including wx headers with the
-isystem flag would help as well (untested).