From: Tom Hughes Date: Thu, 21 Jul 2011 15:07:26 +0000 (+0000) Subject: DWARF comparisons should be signed. Patch from Jakub Jelinek. X-Git-Tag: svn/VALGRIND_3_7_0~333 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca6a8e8db93c12a99ab2de9efe9e805a6c7303bf;p=thirdparty%2Fvalgrind.git DWARF comparisons should be signed. Patch from Jakub Jelinek. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11904 --- diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index 4177a3a482..dcc2719c66 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -1883,10 +1883,10 @@ UWord evalCfiExpr ( XArray* exprs, Int ix, case Cop_Shl: return wL << wR; case Cop_Shr: return wL >> wR; case Cop_Eq: return wL == wR ? 1 : 0; - case Cop_Ge: return wL >= wR ? 1 : 0; - case Cop_Gt: return wL > wR ? 1 : 0; - case Cop_Le: return wL <= wR ? 1 : 0; - case Cop_Lt: return wL < wR ? 1 : 0; + case Cop_Ge: return (Word) wL >= (Word) wR ? 1 : 0; + case Cop_Gt: return (Word) wL > (Word) wR ? 1 : 0; + case Cop_Le: return (Word) wL <= (Word) wR ? 1 : 0; + case Cop_Lt: return (Word) wL < (Word) wR ? 1 : 0; case Cop_Ne: return wL != wR ? 1 : 0; default: goto unhandled; }