From 095c16ead5d432726f2b6de5ce12fd367600076d Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 1 Sep 2021 16:48:55 +0200 Subject: [PATCH 1/3] Simplify 'gcc/diagnostic-spec.h:nowarn_map' setup If we've just read something from the map, we can be sure that it exists. gcc/ * warning-control.cc (copy_warning): Remove 'nowarn_map' setup. --- gcc/warning-control.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gcc/warning-control.cc b/gcc/warning-control.cc index ec8ed232763..9c506e163d6 100644 --- a/gcc/warning-control.cc +++ b/gcc/warning-control.cc @@ -188,9 +188,7 @@ void copy_warning (ToType to, FromType from) /* If there's an entry in the map the no-warning bit must be set. */ gcc_assert (get_no_warning_bit (from)); - if (!nowarn_map) - nowarn_map = xint_hash_map_t::create_ggc (32); - + gcc_checking_assert (nowarn_map); nowarn_map->put (to_key, *from_map); set_no_warning_bit (to, true); } -- 2.30.2