https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115747
--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> --- > Updated patch. Had to guard return error_mark_node for the non-SFINAE case > on !flag_permissive, otherwise it triggers an ICE (statement parsing into > error_mark_node without seen_error ()). Hmm, I think checking seen_error() would be better than flag_permissive, to support -Wno-error=delete-incomplete . Or even compare errorcount before and after the permerror_opt. Perhaps the currently bool diagnostic functions should instead different values for warning and error...