aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1998-02-17 22:43:25 +0000
committerJeff Law <law@gcc.gnu.org>1998-02-17 15:43:25 -0700
commit2fde567ecee0858733c5cd0d28fceefb1906e9d3 (patch)
treed3290a539a2b4027e3efb2bb476e13cdc995d8e7 /gcc/fold-const.c
parent0a7ed33c8703824a9f97178adc8c4f58352d2008 (diff)
downloadgcc-2fde567ecee0858733c5cd0d28fceefb1906e9d3.zip
gcc-2fde567ecee0858733c5cd0d28fceefb1906e9d3.tar.gz
gcc-2fde567ecee0858733c5cd0d28fceefb1906e9d3.tar.bz2
fold-const.c: Include "system.h" to get stdlib.h and stdio.h.
* fold-const.c: Include "system.h" to get stdlib.h and stdio.h. (lshift_double): Add parentheses around + or - inside shift. (rshift_double): Likewise. (size_int_wide): Explicitly set type of `bit_p' to `int'. * Makefile.in (fold-const.o): Depend on system.h. From-SVN: r18057
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 35d8beb..12d9cad 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -43,7 +43,7 @@ Boston, MA 02111-1307, USA. */
forces the value to fit the type. It returns an overflow indicator. */
#include "config.h"
-#include <stdio.h>
+#include "system.h"
#include <setjmp.h>
#include "flags.h"
#include "tree.h"
@@ -356,13 +356,13 @@ lshift_double (l1, h1, count, prec, lv, hv, arith)
if (count >= HOST_BITS_PER_WIDE_INT)
{
- *hv = (unsigned HOST_WIDE_INT) l1 << count - HOST_BITS_PER_WIDE_INT;
+ *hv = (unsigned HOST_WIDE_INT) l1 << (count - HOST_BITS_PER_WIDE_INT);
*lv = 0;
}
else
{
*hv = (((unsigned HOST_WIDE_INT) h1 << count)
- | ((unsigned HOST_WIDE_INT) l1 >> HOST_BITS_PER_WIDE_INT - count - 1 >> 1));
+ | ((unsigned HOST_WIDE_INT) l1 >> (HOST_BITS_PER_WIDE_INT - count - 1) >> 1));
*lv = (unsigned HOST_WIDE_INT) l1 << count;
}
}
@@ -392,14 +392,14 @@ rshift_double (l1, h1, count, prec, lv, hv, arith)
if (count >= HOST_BITS_PER_WIDE_INT)
{
*hv = signmask;
- *lv = ((signmask << 2 * HOST_BITS_PER_WIDE_INT - count - 1 << 1)
- | ((unsigned HOST_WIDE_INT) h1 >> count - HOST_BITS_PER_WIDE_INT));
+ *lv = ((signmask << (2 * HOST_BITS_PER_WIDE_INT - count - 1) << 1)
+ | ((unsigned HOST_WIDE_INT) h1 >> (count - HOST_BITS_PER_WIDE_INT)));
}
else
{
*lv = (((unsigned HOST_WIDE_INT) l1 >> count)
- | ((unsigned HOST_WIDE_INT) h1 << HOST_BITS_PER_WIDE_INT - count - 1 << 1));
- *hv = ((signmask << HOST_BITS_PER_WIDE_INT - count)
+ | ((unsigned HOST_WIDE_INT) h1 << (HOST_BITS_PER_WIDE_INT - count - 1) << 1));
+ *hv = ((signmask << (HOST_BITS_PER_WIDE_INT - count))
| ((unsigned HOST_WIDE_INT) h1 >> count));
}
}
@@ -1429,6 +1429,7 @@ const_binop (code, arg1, arg2, notrunc)
tree
size_int_wide (number, high, bit_p)
unsigned HOST_WIDE_INT number, high;
+ int bit_p;
{
register tree t;
/* Type-size nodes already made for small sizes. */