diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-14 20:55:11 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-14 20:55:11 +0000 |
commit | 2d54b955ff9f573fcc3189f9a031e1a4a1bc96ff (patch) | |
tree | c9332dca3ec3ca34edc8e972059519e24fd0a7e6 /gcc/doloop.c | |
parent | bd4d5fb53955a8c09478c9596157cc017c22eb9c (diff) | |
download | gcc-2d54b955ff9f573fcc3189f9a031e1a4a1bc96ff.tar.gz |
* cse.c (fold_rtx): Avoid empty body in an if-statement.
* doloop.c (doloop_iterations_max, doloop_modify): Avoid using the
`U' integer constant suffix.
* dwarf2out.c (add_subscript_info): Avoid empty body in an
else-statement.
* sparc/sol2.h (__enable_execute_stack): Prototype.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35687 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doloop.c')
-rw-r--r-- | gcc/doloop.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/doloop.c b/gcc/doloop.c index 3933e3ff7c8..cb2b67bf49e 100644 --- a/gcc/doloop.c +++ b/gcc/doloop.c @@ -197,7 +197,7 @@ doloop_iterations_max (loop_info, mode, nonneg) if (GET_CODE (max_value) == CONST_INT) umax = INTVAL (max_value); else - umax = (2U << (GET_MODE_BITSIZE (mode) - 1)) - 1; + umax = ((unsigned)2 << (GET_MODE_BITSIZE (mode) - 1)) - 1; n_iterations_max = umax - umin; break; @@ -212,12 +212,12 @@ doloop_iterations_max (loop_info, mode, nonneg) if (GET_CODE (min_value) == CONST_INT) smin = INTVAL (min_value); else - smin = -(1U << (GET_MODE_BITSIZE (mode) - 1)); + smin = -((unsigned)1 << (GET_MODE_BITSIZE (mode) - 1)); if (GET_CODE (max_value) == CONST_INT) smax = INTVAL (max_value); else - smax = (1U << (GET_MODE_BITSIZE (mode) - 1)) - 1; + smax = ((unsigned)1 << (GET_MODE_BITSIZE (mode) - 1)) - 1; n_iterations_max = smax - smin; break; @@ -230,7 +230,7 @@ doloop_iterations_max (loop_info, mode, nonneg) else /* We need to conservatively assume that we might have the maximum number of iterations without any additional knowledge. */ - n_iterations_max = (2U << (GET_MODE_BITSIZE (mode) - 1)) - 1; + n_iterations_max = ((unsigned)2 << (GET_MODE_BITSIZE (mode) - 1)) - 1; break; default: @@ -241,8 +241,9 @@ doloop_iterations_max (loop_info, mode, nonneg) /* If we know that the iteration count is non-negative then adjust n_iterations_max if it is so large that it appears negative. */ - if (nonneg && n_iterations_max > (1U << (GET_MODE_BITSIZE (mode) - 1))) - n_iterations_max = (1U << (GET_MODE_BITSIZE (mode) - 1)) - 1; + if (nonneg + && n_iterations_max > ((unsigned)1 << (GET_MODE_BITSIZE (mode) - 1))) + n_iterations_max = ((unsigned)1 << (GET_MODE_BITSIZE (mode) - 1)) - 1; return n_iterations_max; } @@ -451,7 +452,7 @@ doloop_modify (loop, iterations, iterations_max, /* Determine if the iteration counter will be non-negative. Note that the maximum value loaded is iterations_max - 1. */ if ((unsigned HOST_WIDE_INT) INTVAL (iterations_max) - <= (1U << (GET_MODE_BITSIZE (GET_MODE (counter_reg)) - 1))) + <= ((unsigned)1 << (GET_MODE_BITSIZE (GET_MODE (counter_reg)) - 1))) nonneg = 1; break; |