https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82892
--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> --- Thanks for filing this. I think a natural way to implement this would be on top of the deferred_diagnostic patch kit here, see e.g.: https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00145.html (that one's still waiting review) and: https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00437.html (I hope to have a go at implementing this for gcc 8 stage 1, but am knee-deep in another bug right now)