From 9a38f84e274c6724172ec676285277a3003336ee Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 6 Jan 2017 19:40:31 +0100 Subject: [PATCH] read-rtl.c (rtx_reader::read_rtx_code): Avoid -Wsign-compare warning. * read-rtl.c (rtx_reader::read_rtx_code): Avoid -Wsign-compare warning. From-SVN: r244178 --- gcc/ChangeLog | 5 +++++ gcc/read-rtl.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5f4577d4735..236d40dd36a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-01-06 Jakub Jelinek + + * read-rtl.c (rtx_reader::read_rtx_code): Avoid -Wsign-compare + warning. + 2017-01-06 Andre Vieira * config/arm/arm.md (): New. diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c index e9c80682800..2a8650b3afa 100644 --- a/gcc/read-rtl.c +++ b/gcc/read-rtl.c @@ -1255,7 +1255,7 @@ rtx_reader::read_rtx_code (const char *code_name) if (strcmp (code_name, "reuse_rtx") == 0) { read_name (&name); - long idx = atoi (name.string); + unsigned idx = atoi (name.string); /* Look it up by ID. */ gcc_assert (idx < m_reuse_rtx_by_id.length ()); return_rtx = m_reuse_rtx_by_id[idx]; -- 2.30.2