https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50871
--- Comment #13 from Jason Merrill <jason at gcc dot gnu.org> --- Created attachment 42754 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42754&action=edit patch to add -Weh-mismatch to handle this case Since the main concern seems to be EH mismatch, how about this?