From: Thomas Schwinge Date: Wed, 1 Sep 2021 14:48:55 +0000 (+0200) Subject: Simplify 'gcc/diagnostic-spec.h:nowarn_map' setup X-Git-Tag: basepoints/gcc-13~4817 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=accf94329d61933e6c58c1d7815fb08d8fc2afa5;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/warning-control.cc b/gcc/warning-control.cc index ec8ed2327630..9c506e163d67 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); }