From ca6a8e8db93c12a99ab2de9efe9e805a6c7303bf Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 21 Jul 2011 15:07:26 +0000 Subject: [PATCH] DWARF comparisons should be signed. Patch from Jakub Jelinek. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11904 --- coregrind/m_debuginfo/debuginfo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; } -- 2.47.3