https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115747
--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> --- Almost, but permerror_opt instead of checking the flag directly. And actually I think cxx_incomplete_type_inform is enough, rather than cxx_incomplete_type_diagnostic.