From: Matthew Malcomson Date: Mon, 9 Dec 2019 13:16:07 +0000 (+0000) Subject: [mid-end] [obvious] Cast to avoid -Wsign-compare warning from r279124 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e6130412c18618b8c6cc0dbc63b27ff2b7d6f8ff;p=gcc.git [mid-end] [obvious] Cast to avoid -Wsign-compare warning from r279124 The previous revision adds a comparison that triggers a warning. Here we simply cast the unsigned integer to a signed one before the comparison. gcc/ChangeLog: 2019-12-09 Matthew Malcomson * regstat.c (regstat_bb_compute_calls_crossed): Add a cast to avoid a warning. From-SVN: r279126 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 43e838cd9bb..b499992dad7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-12-09 Matthew Malcomson + + * regstat.c (regstat_bb_compute_calls_crossed): Add a cast to + avoid a warning. + 2019-12-09 Matthew Malcomson PR middle-end/92410 diff --git a/gcc/regstat.c b/gcc/regstat.c index c6cefb117d7..bf95ecc1273 100644 --- a/gcc/regstat.c +++ b/gcc/regstat.c @@ -324,7 +324,7 @@ regstat_bb_compute_calls_crossed (unsigned int bb_index, bitmap live) FOR_BB_INSNS_REVERSE (bb, insn) { - gcc_assert (INSN_UID (insn) < DF_INSN_SIZE ()); + gcc_assert (INSN_UID (insn) < (int) DF_INSN_SIZE ()); struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn); unsigned int regno;