Cast return of strtol to unsigned int
authorH.J. Lu <hongjiu.lu@intel.com>
Fri, 26 Jun 2015 02:35:12 +0000 (02:35 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Fri, 26 Jun 2015 02:35:12 +0000 (19:35 -0700)
commitcf3e5186466c0c10bd0f0eb70cfb07cd94879ea3
tree0e00a96cda65c555ffea9114b00f70a43f0e5a86
parent93c5d1fa354f9ca4ab6d1a739b2052b8f3ef84a3
Cast return of strtol to unsigned int

strtol returns long, which is compared against unsigned int.  On 32-bit
hosts, it leads to

gcc/gentarget-def.c: In function void def_target_insn(const char*, const char*):
gcc/gentarget-def.c:88:34: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]

This patch casts return of strtol to unsigned int to avoid the error.

* gentarget-def.c (def_target_insn): Cast return of strtol to
unsigned int.

From-SVN: r224993
gcc/ChangeLog
gcc/gentarget-def.c