summaryrefslogtreecommitdiff
path: root/gcc/cppexp.c
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-27 20:54:50 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-27 20:54:50 +0000
commit11aafc65723c2b05ae51ecb120ef1d2a47c763c5 (patch)
tree2a4cc25d01e79aca86b02bb4994762c9193fbd91 /gcc/cppexp.c
parentbe9fb4f85d5eae0fa433bb6576584a4b32b603cc (diff)
downloadgcc-11aafc65723c2b05ae51ecb120ef1d2a47c763c5.tar.gz
2002-05-27 H.J. Lu (hjl@gnu.org)
* cppexp.c (num_trim): Use 1UL instead of 1 for long int. (num_positive): Likewise. (num_div_op): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53939 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppexp.c')
-rw-r--r--gcc/cppexp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/cppexp.c b/gcc/cppexp.c
index b2bad21a248..53411fe2ac6 100644
--- a/gcc/cppexp.c
+++ b/gcc/cppexp.c
@@ -787,12 +787,12 @@ num_trim (num, precision)
{
precision -= PART_PRECISION;
if (precision < PART_PRECISION)
- num.high &= (1 << precision) - 1;
+ num.high &= (1UL << precision) - 1;
}
else
{
if (precision < PART_PRECISION)
- num.low &= (1 << precision) - 1;
+ num.low &= (1UL << precision) - 1;
num.high = 0;
}
@@ -808,10 +808,10 @@ num_positive (num, precision)
if (precision > PART_PRECISION)
{
precision -= PART_PRECISION;
- return (num.high & (1 << (precision - 1))) == 0;
+ return (num.high & (1UL << (precision - 1))) == 0;
}
- return (num.low & (1 << (precision - 1))) == 0;
+ return (num.low & (1UL << (precision - 1))) == 0;
}
/* Returns the negative of NUM. */
@@ -1245,7 +1245,7 @@ num_div_op (pfile, lhs, rhs, op)
if (rhs.high)
{
i = precision - 1;
- mask = 1 << (i - PART_PRECISION);
+ mask = 1UL << (i - PART_PRECISION);
for (; ; i--, mask >>= 1)
if (rhs.high & mask)
break;
@@ -1256,7 +1256,7 @@ num_div_op (pfile, lhs, rhs, op)
i = precision - PART_PRECISION - 1;
else
i = precision - 1;
- mask = 1 << i;
+ mask = 1UL << i;
for (; ; i--, mask >>= 1)
if (rhs.low & mask)
break;
@@ -1284,9 +1284,9 @@ num_div_op (pfile, lhs, rhs, op)
{
lhs = num_binary_op (pfile, lhs, sub, CPP_MINUS);
if (i >= PART_PRECISION)
- result.high |= 1 << (i - PART_PRECISION);
+ result.high |= 1UL << (i - PART_PRECISION);
else
- result.low |= 1 << i;
+ result.low |= 1UL << i;
}
if (i-- == 0)
break;