From 44e1f63e20fec07e3a10d8e75336cfda64c911bf Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Thu, 5 Nov 2020 18:23:56 -0500 Subject: [PATCH] c++: Add auto_diagnostic_group to check_handlers_1. This was missing. gcc/cp/ChangeLog: * except.c (check_handlers_1): Add auto_diagnostic_group. --- gcc/cp/except.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/cp/except.c b/gcc/cp/except.c index 985206f6a64..b72a28c1aa9 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -975,6 +975,7 @@ check_handlers_1 (tree master, tree_stmt_iterator i) tree handler = tsi_stmt (i); if (TREE_TYPE (handler) && can_convert_eh (type, TREE_TYPE (handler))) { + auto_diagnostic_group d; if (warning_at (EXPR_LOCATION (handler), OPT_Wexceptions, "exception of type %qT will be caught by earlier " "handler", TREE_TYPE (handler))) -- 2.30.2