I'm mentioning this here because I think the Emacs community would be
interested in this capability, though I suspect that it would also be
really neat if GCC developed a language server for C and C++.

Apparently someone started working on this outside of emacs-dev: https://github.com/sourcegraph/emacs-lsp

Philippe