aboutsummaryrefslogtreecommitdiff
path: root/gcc/unwind-pe.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/unwind-pe.h')
-rw-r--r--gcc/unwind-pe.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/unwind-pe.h b/gcc/unwind-pe.h
index 224ade33209..4bf2cfd3f02 100644
--- a/gcc/unwind-pe.h
+++ b/gcc/unwind-pe.h
@@ -137,7 +137,7 @@ read_uleb128 (const unsigned char *p, _Unwind_Word *val)
do
{
byte = *p++;
- result |= (byte & 0x7f) << shift;
+ result |= ((_Unwind_Word)byte & 0x7f) << shift;
shift += 7;
}
while (byte & 0x80);
@@ -159,14 +159,14 @@ read_sleb128 (const unsigned char *p, _Unwind_Sword *val)
do
{
byte = *p++;
- result |= (byte & 0x7f) << shift;
+ result |= ((_Unwind_Word)byte & 0x7f) << shift;
shift += 7;
}
while (byte & 0x80);
/* Sign-extend a negative value. */
if (shift < 8 * sizeof(result) && (byte & 0x40) != 0)
- result |= -(1L << shift);
+ result |= -(((_Unwind_Word)1L) << shift);
*val = (_Unwind_Sword) result;
return p;
@@ -199,7 +199,7 @@ read_encoded_value_with_base (unsigned char encoding, _Unwind_Ptr base,
_Unwind_Internal_Ptr a = (_Unwind_Internal_Ptr) p;
a = (a + sizeof (void *) - 1) & - sizeof(void *);
result = *(_Unwind_Internal_Ptr *) a;
- p = (const unsigned char *) (a + sizeof (void *));
+ p = (const unsigned char *) (_Unwind_Internal_Ptr) (a + sizeof (void *));
}
else
{