https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100003
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> --- The problem is that, when we're in a system header, check_redeclaration_exception_specification doesn't emit an error: 1242 if (DECL_IN_SYSTEM_HEADER (old_decl)) 1243 complained = pedwarn (new_loc, OPT_Wsystem_headers, msg, new_decl); so then we crash here: 2420 gcc_checking_assert (!TREE_PURPOSE (add) 2421 || errorcount || !flag_exceptions 2422 || cp_tree_equal (noex, TREE_PURPOSE (add)));