This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
more warning patches, part 3/3
- To: egcs-patches at cygnus dot com
- Subject: more warning patches, part 3/3
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Tue, 13 Oct 1998 22:03:38 -0400 (EDT)
More warning patches. This is part 3/3. Okay to install?
--Kaveh
(PS: Jeff, this set also includes the conditional ATTRIBUTE_UNUSED
hacks. I'll remove them before final checkin.)
Tue Oct 13 18:32:19 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* protoize.c (is_id_char): Change type of parameter `ch' to
unsigned char.
(munge_compile_params): Cast argument of ctype macro to (const
unsigned char).
(process_aux_info_file): Cast variable `aux_info_size' to int when
comparing against one.
(forward_to_next_token_char): Cast argument of ctype macro to
`const unsigned char'.
(edit_formals_lists): Likewise.
(find_rightmost_formals_list): Likewise.
(add_local_decl): Likewise.
(add_global_decls): Likewise.
(edit_fn_definition): Likewise.
(do_cleaning): Likewise.
(scan_for_missed_items): Likewise.
(edit_file): Cast variable `orig_size' to (int) when comparing
against one.
(main): Cast argument of ctype macro to `const unsigned char'.
* recog.c (const_int_operand): Mark parameter `mode' with
ATTRIBUTE_UNUSED.
* regclass.c (record_reg_classes): Change type of variable `c' to
`unsigned char'. Cast `char' array index to `unsigned char'.
* reload.c (push_secondary_reload): Cast argument to
REG_CLASS_FROM_LETTER() macro to `unsigned char'.
* reload1.c (calculate_needs): Cast `char' array index to
`unsigned char'.
(set_label_offsets): Change type of variable `i' to unsigned int.
Cast result of XVECLEN() macro to unsigned when comparing against
one.
(mark_not_eliminable): Change type of variable `i' to unsigned.
(order_regs_for_reload): Likewise. Cast `max_regno' to unsigned
when comparing against one.
(reload_as_needed): Cast macro NUM_ELIMINABLE_REGS to (int) when
comparing against one.
(choose_reload_regs): Hide unused label `fail'.
(reload_cse_simplify_operands): Cast `char' array index to
`unsigned char'.
(reload_combine_note_store): Mark parameter `set' with
ATTRIBUTE_UNUSED. Cast UNITS_PER_WORD to unsigned when comparing
against one.
(reload_cse_move2add): Remove unused variable `src2'.
* sched.c: Include recog.h.
(sched_note_set): Remove unused parameter `b'. All callers
changed.
(split_hard_reg_notes): Likewise for parameter `orig_insn'.
(blockage_range): Cast result of UNIT_BLOCKED() macro to (int)
when comparing against one.
* stupid.c (stupid_find_reg): Mark parameter `changes_size' with
ATTRIBUTE_UNUSED. Cast `sizeof' expression to (int) when
comparing against one.
* unroll.c (precondition_loop_p): Remove unused parameter
`loop_end'. All callers changed.
diff -rup orig/egcs-CVS19981012/gcc/protoize.c egcs-CVS19981012/gcc/protoize.c
--- orig/egcs-CVS19981012/gcc/protoize.c Tue Oct 13 17:38:01 1998
+++ egcs-CVS19981012/gcc/protoize.c Tue Oct 13 12:33:27 1998
@@ -828,7 +828,7 @@ restore_pointers ()
static int
is_id_char (ch)
- char ch;
+ unsigned char ch;
{
return (ISALNUM (ch) || (ch == '_') || (ch == '$'));
}
@@ -2006,12 +2006,12 @@ munge_compile_params (params_list)
temp_params[param_count++] = compiler_file_name;
for (;;)
{
- while (ISSPACE (*params_list))
+ while (ISSPACE ((const unsigned char)*params_list))
params_list++;
if (!*params_list)
break;
param = params_list;
- while (*params_list && !ISSPACE (*params_list))
+ while (*params_list && !ISSPACE ((const unsigned char)*params_list))
params_list++;
if (param[0] != '-')
temp_params[param_count++]
@@ -2026,9 +2026,10 @@ munge_compile_params (params_list)
case 'c':
break; /* Don't copy these. */
case 'o':
- while (ISSPACE (*params_list))
+ while (ISSPACE ((const unsigned char)*params_list))
params_list++;
- while (*params_list && !ISSPACE (*params_list))
+ while (*params_list
+ && !ISSPACE ((const unsigned char)*params_list))
params_list++;
break;
default:
@@ -2291,7 +2292,8 @@ start_over: ;
/* Read the aux_info file into memory. */
- if (safe_read (aux_info_file, aux_info_base, aux_info_size) != aux_info_size)
+ if (safe_read (aux_info_file, aux_info_base, aux_info_size) !=
+ (int) aux_info_size)
{
int errno_val = errno;
fprintf (stderr, "%s: error reading aux info file `%s': %s\n",
@@ -2959,7 +2961,8 @@ static const char *
forward_to_next_token_char (ptr)
const char *ptr;
{
- for (++ptr; ISSPACE (*ptr); check_source (++ptr < clean_text_limit, 0))
+ for (++ptr; ISSPACE ((const unsigned char)*ptr);
+ check_source (++ptr < clean_text_limit, 0))
continue;
return ptr;
}
@@ -3327,7 +3330,7 @@ edit_formals_lists (end_formals, f_list_
next_end = start_formals - 1;
check_source (next_end > clean_read_ptr, 0);
- while (ISSPACE (*next_end))
+ while (ISSPACE ((const unsigned char)*next_end))
check_source (--next_end > clean_read_ptr, 0);
check_source (*next_end == ')', next_end);
check_source (--next_end > clean_read_ptr, 0);
@@ -3347,7 +3350,8 @@ edit_formals_lists (end_formals, f_list_
const char *func_name_limit;
size_t func_name_len;
- for (func_name_limit = start_formals-1; ISSPACE (*func_name_limit); )
+ for (func_name_limit = start_formals-1;
+ ISSPACE ((const unsigned char)*func_name_limit); )
check_source (--func_name_limit > clean_read_ptr, 0);
for (func_name_start = func_name_limit++;
@@ -3473,8 +3477,8 @@ find_rightmost_formals_list (clean_text_
while (*end_formals != ')')
{
- if (ISSPACE (*end_formals))
- while (ISSPACE (*end_formals))
+ if (ISSPACE ((const unsigned char)*end_formals))
+ while (ISSPACE ((const unsigned char)*end_formals))
check_source (--end_formals > clean_read_ptr, 0);
else
check_source (--end_formals > clean_read_ptr, 0);
@@ -3492,7 +3496,7 @@ find_rightmost_formals_list (clean_text_
by an alphabetic character, while others *cannot* validly be followed
by such characters. */
- if ((ch == '{') || ISALPHA (ch))
+ if ((ch == '{') || ISALPHA ((unsigned char)ch))
break;
/* At this point, we have found a right paren, but we know that it is
@@ -3588,7 +3592,7 @@ add_local_decl (def_dec_p, clean_text_p)
We can now just scan backwards and find the left end of the existing
indentation string, and then copy it to the output buffer. */
- for (sp = ep; ISSPACE (*sp) && *sp != '\n'; sp--)
+ for (sp = ep; ISSPACE ((const unsigned char)*sp) && *sp != '\n'; sp--)
continue;
/* Now write out the open { which began this block, and any following
@@ -3669,7 +3673,7 @@ add_global_decls (file_p, clean_text_p)
header. We will put in the added declarations just prior to that. */
scan_p++;
- while (ISSPACE (*scan_p))
+ while (ISSPACE ((const unsigned char)*scan_p))
scan_p++;
scan_p--;
@@ -3838,7 +3842,7 @@ edit_fn_definition (def_dec_p, clean_tex
{
have_newlines |= (*scan_orig == '\n');
/* Leave identical whitespace alone. */
- if (!ISSPACE (*scan_orig))
+ if (!ISSPACE ((const unsigned char)*scan_orig))
*((NONCONST char *)scan_orig) = ' '; /* identical - so whiteout */
}
else
@@ -3882,7 +3886,7 @@ do_cleaning (new_clean_text_base, new_cl
scan_p += 2;
while (scan_p[1] != '/' || scan_p[0] != '*')
{
- if (!ISSPACE (*scan_p))
+ if (!ISSPACE ((const unsigned char)*scan_p))
*scan_p = ' ';
if (++scan_p >= new_clean_text_limit)
abort ();
@@ -3897,7 +3901,7 @@ do_cleaning (new_clean_text_base, new_cl
*scan_p = ' ';
while (scan_p[1] != '\n' || scan_p[0] == '\\')
{
- if (!ISSPACE (*scan_p))
+ if (!ISSPACE ((const unsigned char)*scan_p))
*scan_p = ' ';
if (++scan_p >= new_clean_text_limit)
abort ();
@@ -3909,9 +3913,10 @@ do_cleaning (new_clean_text_base, new_cl
non_whitespace_since_newline = 1;
while (scan_p[1] != '\'' || scan_p[0] == '\\')
{
- if (scan_p[0] == '\\' && !ISSPACE (scan_p[1]))
+ if (scan_p[0] == '\\'
+ && !ISSPACE ((const unsigned char)scan_p[1]))
scan_p[1] = ' ';
- if (!ISSPACE (*scan_p))
+ if (!ISSPACE ((const unsigned char)*scan_p))
*scan_p = ' ';
if (++scan_p >= new_clean_text_limit)
abort ();
@@ -3923,14 +3928,15 @@ do_cleaning (new_clean_text_base, new_cl
non_whitespace_since_newline = 1;
while (scan_p[1] != '"' || scan_p[0] == '\\')
{
- if (scan_p[0] == '\\' && !ISSPACE (scan_p[1]))
+ if (scan_p[0] == '\\'
+ && !ISSPACE ((const unsigned char)scan_p[1]))
scan_p[1] = ' ';
- if (!ISSPACE (*scan_p))
+ if (!ISSPACE ((const unsigned char)*scan_p))
*scan_p = ' ';
if (++scan_p >= new_clean_text_limit)
abort ();
}
- if (!ISSPACE (*scan_p))
+ if (!ISSPACE ((const unsigned char)*scan_p))
*scan_p = ' ';
scan_p++;
break;
@@ -4023,12 +4029,12 @@ scan_for_missed_items (file_p)
last_r_paren = scan_p;
- for (ahead_p = scan_p + 1; ISSPACE (*ahead_p); )
+ for (ahead_p = scan_p + 1; ISSPACE ((const unsigned char)*ahead_p); )
check_source (++ahead_p < limit, limit);
scan_p = ahead_p - 1;
- if (ISALPHA (*ahead_p) || *ahead_p == '{')
+ if (ISALPHA ((const unsigned char)*ahead_p) || *ahead_p == '{')
{
const char *last_l_paren;
const int lineno = identify_lineno (ahead_p);
@@ -4042,7 +4048,8 @@ scan_for_missed_items (file_p)
do
{
last_l_paren = careful_find_l_paren (last_r_paren);
- for (last_r_paren = last_l_paren-1; ISSPACE (*last_r_paren); )
+ for (last_r_paren = last_l_paren-1;
+ ISSPACE ((const unsigned char)*last_r_paren); )
check_source (--last_r_paren >= backup_limit, backup_limit);
}
while (*last_r_paren == ')');
@@ -4223,7 +4230,8 @@ edit_file (hp)
in one swell fwoop. Then figure out where the end of the text is and
make sure that it ends with a newline followed by a null. */
- if (safe_read (input_file, new_orig_text_base, orig_size) != orig_size)
+ if (safe_read (input_file, new_orig_text_base, orig_size) !=
+ (int) orig_size)
{
int errno_val = errno;
close (input_file);
@@ -4681,7 +4689,8 @@ main (argc, argv)
{
const char *cp;
- for (cp = varargs_style_indicator; ISALNUM (*cp) || *cp == '_'; cp++)
+ for (cp = varargs_style_indicator;
+ ISALNUM ((const unsigned char)*cp) || *cp == '_'; cp++)
continue;
if (*cp != 0)
varargs_style_indicator = savestring (varargs_style_indicator,
diff -rup orig/egcs-CVS19981012/gcc/recog.c egcs-CVS19981012/gcc/recog.c
--- orig/egcs-CVS19981012/gcc/recog.c Mon Oct 12 21:09:23 1998
+++ egcs-CVS19981012/gcc/recog.c Tue Oct 13 11:51:56 1998
@@ -1011,7 +1011,7 @@ immediate_operand (op, mode)
int
const_int_operand (op, mode)
register rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return GET_CODE (op) == CONST_INT;
}
diff -rup orig/egcs-CVS19981012/gcc/regclass.c egcs-CVS19981012/gcc/regclass.c
--- orig/egcs-CVS19981012/gcc/regclass.c Mon Oct 12 21:09:23 1998
+++ egcs-CVS19981012/gcc/regclass.c Tue Oct 13 10:43:16 1998
@@ -1134,7 +1134,7 @@ record_reg_classes (n_alts, n_ops, ops,
enum machine_mode mode = modes[i];
int allows_mem = 0;
int win = 0;
- char c;
+ unsigned char c;
/* If this operand has no constraints at all, we can conclude
nothing about it since anything is valid. */
@@ -1394,7 +1394,7 @@ record_reg_classes (n_alts, n_ops, ops,
if (prefclass)
alt_cost
- += may_move_cost[prefclass[REGNO (op)]][(int) classes[i]];
+ += may_move_cost[(unsigned char)prefclass[REGNO (op)]][(int) classes[i]];
}
}
@@ -1466,9 +1466,9 @@ record_reg_classes (n_alts, n_ops, ops,
int nr;
if (regno >= FIRST_PSEUDO_REGISTER && prefclass != 0
- && (reg_class_size[prefclass[regno]]
+ && (reg_class_size[(unsigned char)prefclass[regno]]
== CLASS_MAX_NREGS (prefclass[regno], mode)))
- op_costs[i].cost[prefclass[regno]] = -1;
+ op_costs[i].cost[(unsigned char)prefclass[regno]] = -1;
else if (regno < FIRST_PSEUDO_REGISTER)
for (class = 0; class < N_REG_CLASSES; class++)
if (TEST_HARD_REG_BIT (reg_class_contents[class], regno)
diff -rup orig/egcs-CVS19981012/gcc/reload.c egcs-CVS19981012/gcc/reload.c
--- orig/egcs-CVS19981012/gcc/reload.c Mon Oct 12 21:09:24 1998
+++ egcs-CVS19981012/gcc/reload.c Tue Oct 13 10:54:44 1998
@@ -445,7 +445,7 @@ push_secondary_reload (in_p, x, opnum, o
char insn_letter = insn_operand_constraint[(int) icode][!in_p][in_p];
enum reg_class insn_class
= (insn_letter == 'r' ? GENERAL_REGS
- : REG_CLASS_FROM_LETTER (insn_letter));
+ : REG_CLASS_FROM_LETTER ((unsigned char) insn_letter));
if (insn_class == NO_REGS
|| (in_p && insn_operand_constraint[(int) icode][!in_p][0] != '=')
@@ -462,7 +462,7 @@ push_secondary_reload (in_p, x, opnum, o
class = insn_class;
t_mode = insn_operand_mode[(int) icode][2];
t_class = (t_letter == 'r' ? GENERAL_REGS
- : REG_CLASS_FROM_LETTER (t_letter));
+ : REG_CLASS_FROM_LETTER ((unsigned char) t_letter));
t_icode = icode;
icode = CODE_FOR_nothing;
}
diff -rup orig/egcs-CVS19981012/gcc/reload1.c egcs-CVS19981012/gcc/reload1.c
--- orig/egcs-CVS19981012/gcc/reload1.c Mon Oct 12 21:09:25 1998
+++ egcs-CVS19981012/gcc/reload1.c Tue Oct 13 11:33:21 1998
@@ -1529,10 +1529,10 @@ calculate_needs (this_block, insn, avoid
}
else if (size == 1)
{
- this_needs->regs[reload_nongroup[i]][(int) class] += 1;
+ this_needs->regs[(unsigned char)reload_nongroup[i]][(int) class] += 1;
p = reg_class_superclasses[(int) class];
while (*p != LIM_REG_CLASSES)
- this_needs->regs[reload_nongroup[i]][(int) *p++] += 1;
+ this_needs->regs[(unsigned char)reload_nongroup[i]][(int) *p++] += 1;
}
else
abort ();
@@ -2542,7 +2542,7 @@ set_label_offsets (x, insn, initial_p)
{
enum rtx_code code = GET_CODE (x);
rtx tem;
- int i;
+ unsigned int i;
struct elim_table *p;
switch (code)
@@ -2625,7 +2625,7 @@ set_label_offsets (x, insn, initial_p)
offsets. We want the first field for ADDR_VEC and the second
field for ADDR_DIFF_VEC. */
- for (i = 0; i < XVECLEN (x, code == ADDR_DIFF_VEC); i++)
+ for (i = 0; i < (unsigned) XVECLEN (x, code == ADDR_DIFF_VEC); i++)
set_label_offsets (XVECEXP (x, code == ADDR_DIFF_VEC, i),
insn, initial_p);
return;
@@ -3545,7 +3545,7 @@ mark_not_eliminable (dest, x)
rtx dest;
rtx x;
{
- register int i;
+ register unsigned int i;
/* A SUBREG of a hard register here is just changing its mode. We should
not see a SUBREG of an eliminable hard register, but check just in
@@ -3899,7 +3899,7 @@ hard_reg_use_compare (p1p, p2p)
static void
order_regs_for_reload ()
{
- register int i;
+ register unsigned int i;
register int o = 0;
int large = 0;
@@ -3919,7 +3919,7 @@ order_regs_for_reload ()
hard_reg_n_uses[i].regno = i;
}
- for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
+ for (i = FIRST_PSEUDO_REGISTER; i < (unsigned) max_regno; i++)
{
int regno = reg_renumber[i];
if (regno >= 0)
@@ -4044,7 +4044,7 @@ reload_as_needed (first, live_known)
/* Reset all offsets on eliminable registers to their initial values. */
#ifdef ELIMINABLE_REGS
- for (i = 0; i < NUM_ELIMINABLE_REGS; i++)
+ for (i = 0; i < (int) NUM_ELIMINABLE_REGS; i++)
{
INITIAL_ELIMINATION_OFFSET (reg_eliminate[i].from, reg_eliminate[i].to,
reg_eliminate[i].initial_offset);
@@ -4082,7 +4082,7 @@ reload_as_needed (first, live_known)
if (GET_CODE (insn) == CODE_LABEL)
{
num_not_at_initial_offset = 0;
- for (i = 0; i < NUM_ELIMINABLE_REGS; i++)
+ for (i = 0; i < (int) NUM_ELIMINABLE_REGS; i++)
{
reg_eliminate[i].offset = reg_eliminate[i].previous_offset
= offsets_at[CODE_LABEL_NUMBER (insn)][i];
@@ -6021,7 +6021,9 @@ choose_reload_regs (insn, avoid_return_r
if (j == n_reloads)
break;
+#if 0
fail:
+#endif
/* Loop around and try without any inheritance. */
/* First undo everything done by the failed attempt
to allocate with inheritance. */
@@ -8873,7 +8875,7 @@ reload_cse_simplify_operands (insn)
default:
class
- = reg_class_subunion[(int) class][(int) REG_CLASS_FROM_LETTER (c)];
+ = reg_class_subunion[(int) class][(int) REG_CLASS_FROM_LETTER ((unsigned char)c)];
break;
case ',': case '\0':
@@ -9403,7 +9405,7 @@ reload_combine ()
The second argument, SET, is ignored. */
static void
reload_combine_note_store (dst, set)
- rtx dst, set;
+ rtx dst, set ATTRIBUTE_UNUSED;
{
int regno = 0;
int i;
@@ -9419,7 +9421,7 @@ reload_combine_note_store (dst, set)
regno += REGNO (dst);
/* note_stores might have stripped a STRICT_LOW_PART, so we have to be
careful with registers / register parts that are not full words. */
- if (size < UNITS_PER_WORD)
+ if (size < (unsigned) UNITS_PER_WORD)
reg_state[regno].use_index = -1;
else
{
@@ -9656,7 +9658,6 @@ reload_cse_move2add (first)
&& XEXP (SET_SRC (set), 0) == reg
&& GET_CODE (XEXP (SET_SRC (set), 1)) == CONST_INT)
{
- rtx src2 = SET_SRC (set);
rtx src3 = XEXP (SET_SRC (set), 1);
rtx new_src = GEN_INT (INTVAL (src3)
- INTVAL (reg_offset[regno]));
diff -rup orig/egcs-CVS19981012/gcc/sched.c egcs-CVS19981012/gcc/sched.c
--- orig/egcs-CVS19981012/gcc/sched.c Mon Oct 12 21:09:26 1998
+++ egcs-CVS19981012/gcc/sched.c Tue Oct 13 11:45:49 1998
@@ -126,6 +126,7 @@ Boston, MA 02111-1307, USA. */
#include "flags.h"
#include "insn-config.h"
#include "insn-attr.h"
+#include "recog.h"
#ifndef INSN_SCHEDULING
void
@@ -325,7 +326,7 @@ static void sched_analyze_1 PROTO((rtx,
static void sched_analyze_2 PROTO((rtx, rtx));
static void sched_analyze_insn PROTO((rtx, rtx, rtx));
static int sched_analyze PROTO((rtx, rtx));
-static void sched_note_set PROTO((int, rtx, int));
+static void sched_note_set PROTO((rtx, int));
static int rank_for_schedule PROTO((const GENERIC_PTR, const GENERIC_PTR));
static void swap_sort PROTO((rtx *, int));
static void queue_insn PROTO((rtx, int));
@@ -342,7 +343,7 @@ static void finish_sometimes_live PROTO(
static rtx reemit_notes PROTO((rtx, rtx));
static void schedule_block PROTO((int, FILE *));
static rtx regno_use_in PROTO((int, rtx));
-static void split_hard_reg_notes PROTO((rtx, rtx, rtx, rtx));
+static void split_hard_reg_notes PROTO((rtx, rtx, rtx));
static void new_insn_dead_notes PROTO((rtx, rtx, rtx, rtx));
static void update_n_sets PROTO((rtx, int));
static void update_flow_info PROTO((rtx, rtx, rtx, rtx));
@@ -606,7 +607,7 @@ blockage_range (unit, insn)
unsigned int blockage = INSN_BLOCKAGE (insn);
unsigned int range;
- if (UNIT_BLOCKED (blockage) != unit + 1)
+ if ((int) UNIT_BLOCKED (blockage) != unit + 1)
{
range = function_units[unit].blockage_range_function (insn);
/* We only cache the blockage range for one unit and then only if
@@ -1762,8 +1763,7 @@ sched_analyze (head, tail)
are scanning forwards. Mark that register as being born. */
static void
-sched_note_set (b, x, death)
- int b;
+sched_note_set (x, death)
rtx x;
int death;
{
@@ -2926,20 +2926,20 @@ schedule_block (b, file)
a register must be marked as dead after this insn. */
if (GET_CODE (PATTERN (insn)) == SET
|| GET_CODE (PATTERN (insn)) == CLOBBER)
- sched_note_set (b, PATTERN (insn), 0);
+ sched_note_set (PATTERN (insn), 0);
else if (GET_CODE (PATTERN (insn)) == PARALLEL)
{
int j;
for (j = XVECLEN (PATTERN (insn), 0) - 1; j >= 0; j--)
if (GET_CODE (XVECEXP (PATTERN (insn), 0, j)) == SET
|| GET_CODE (XVECEXP (PATTERN (insn), 0, j)) == CLOBBER)
- sched_note_set (b, XVECEXP (PATTERN (insn), 0, j), 0);
+ sched_note_set (XVECEXP (PATTERN (insn), 0, j), 0);
/* ??? This code is obsolete and should be deleted. It
is harmless though, so we will leave it in for now. */
for (j = XVECLEN (PATTERN (insn), 0) - 1; j >= 0; j--)
if (GET_CODE (XVECEXP (PATTERN (insn), 0, j)) == USE)
- sched_note_set (b, XVECEXP (PATTERN (insn), 0, j), 0);
+ sched_note_set (XVECEXP (PATTERN (insn), 0, j), 0);
}
/* Each call clobbers (makes live) all call-clobbered regs
@@ -3036,20 +3036,20 @@ schedule_block (b, file)
must be marked as dead after this insn. */
if (GET_CODE (PATTERN (insn)) == SET
|| GET_CODE (PATTERN (insn)) == CLOBBER)
- sched_note_set (b, PATTERN (insn), 0);
+ sched_note_set (PATTERN (insn), 0);
else if (GET_CODE (PATTERN (insn)) == PARALLEL)
{
int j;
for (j = XVECLEN (PATTERN (insn), 0) - 1; j >= 0; j--)
if (GET_CODE (XVECEXP (PATTERN (insn), 0, j)) == SET
|| GET_CODE (XVECEXP (PATTERN (insn), 0, j)) == CLOBBER)
- sched_note_set (b, XVECEXP (PATTERN (insn), 0, j), 0);
+ sched_note_set (XVECEXP (PATTERN (insn), 0, j), 0);
/* ??? This code is obsolete and should be deleted. It
is harmless though, so we will leave it in for now. */
for (j = XVECLEN (PATTERN (insn), 0) - 1; j >= 0; j--)
if (GET_CODE (XVECEXP (PATTERN (insn), 0, j)) == USE)
- sched_note_set (b, XVECEXP (PATTERN (insn), 0, j), 0);
+ sched_note_set (XVECEXP (PATTERN (insn), 0, j), 0);
}
/* Each call clobbers (makes live) all call-clobbered regs that are
@@ -3279,14 +3279,14 @@ schedule_block (b, file)
/* See if this is the last notice we must take of a register. */
if (GET_CODE (PATTERN (insn)) == SET
|| GET_CODE (PATTERN (insn)) == CLOBBER)
- sched_note_set (b, PATTERN (insn), 1);
+ sched_note_set (PATTERN (insn), 1);
else if (GET_CODE (PATTERN (insn)) == PARALLEL)
{
int j;
for (j = XVECLEN (PATTERN (insn), 0) - 1; j >= 0; j--)
if (GET_CODE (XVECEXP (PATTERN (insn), 0, j)) == SET
|| GET_CODE (XVECEXP (PATTERN (insn), 0, j)) == CLOBBER)
- sched_note_set (b, XVECEXP (PATTERN (insn), 0, j), 1);
+ sched_note_set (XVECEXP (PATTERN (insn), 0, j), 1);
}
/* This code keeps life analysis information up to date. */
@@ -3593,8 +3593,8 @@ regno_use_in (regno, x)
several smaller hard register references in the split insns. */
static void
-split_hard_reg_notes (note, first, last, orig_insn)
- rtx note, first, last, orig_insn;
+split_hard_reg_notes (note, first, last)
+ rtx note, first, last;
{
rtx reg, temp, link;
int n_regs, i, new_reg;
@@ -3823,7 +3823,7 @@ update_flow_info (notes, first, last, or
&& GET_CODE (temp) == REG
&& REGNO (temp) < FIRST_PSEUDO_REGISTER
&& HARD_REGNO_NREGS (REGNO (temp), GET_MODE (temp)) > 1)
- split_hard_reg_notes (note, first, last, orig_insn);
+ split_hard_reg_notes (note, first, last);
else
{
XEXP (note, 1) = REG_NOTES (insn);
diff -rup orig/egcs-CVS19981012/gcc/stupid.c egcs-CVS19981012/gcc/stupid.c
--- orig/egcs-CVS19981012/gcc/stupid.c Mon Oct 12 21:09:27 1998
+++ egcs-CVS19981012/gcc/stupid.c Tue Oct 13 10:23:55 1998
@@ -497,7 +497,11 @@ stupid_find_reg (call_preserved, class,
enum reg_class class;
enum machine_mode mode;
int born_insn, dead_insn;
- int changes_size;
+ int changes_size
+#ifndef CLASS_CANNOT_CHANGE_SIZE
+ ATTRIBUTE_UNUSED
+#endif
+ ;
{
register int i, ins;
#ifdef HARD_REG_SET
@@ -519,7 +523,7 @@ stupid_find_reg (call_preserved, class,
call_preserved ? call_used_reg_set : fixed_reg_set);
#ifdef ELIMINABLE_REGS
- for (i = 0; i < sizeof eliminables / sizeof eliminables[0]; i++)
+ for (i = 0; i < (int)(sizeof eliminables / sizeof eliminables[0]); i++)
SET_HARD_REG_BIT (used, eliminables[i].from);
#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
SET_HARD_REG_BIT (used, HARD_FRAME_POINTER_REGNUM);
diff -rup orig/egcs-CVS19981012/gcc/unroll.c egcs-CVS19981012/gcc/unroll.c
--- orig/egcs-CVS19981012/gcc/unroll.c Mon Oct 12 21:09:30 1998
+++ egcs-CVS19981012/gcc/unroll.c Tue Oct 13 10:19:38 1998
@@ -198,7 +198,7 @@ enum rtx_code loop_comparison_code;
/* Forward declarations. */
static void init_reg_map PROTO((struct inline_remap *, int));
-static int precondition_loop_p PROTO((rtx *, rtx *, rtx *, rtx, rtx));
+static int precondition_loop_p PROTO((rtx *, rtx *, rtx *, rtx));
static rtx calculate_giv_inc PROTO((rtx, rtx, int));
static rtx initial_reg_note_copy PROTO((rtx, struct inline_remap *));
static void final_reg_note_copy PROTO((rtx, struct inline_remap *));
@@ -858,7 +858,7 @@ unroll_loop (loop_end, insn_count, loop_
rtx initial_value, final_value, increment;
if (precondition_loop_p (&initial_value, &final_value, &increment,
- loop_start, loop_end))
+ loop_start))
{
register rtx diff ;
enum machine_mode mode;
@@ -1319,10 +1319,9 @@ unroll_loop (loop_end, insn_count, loop_
whether divide is cheap. */
static int
-precondition_loop_p (initial_value, final_value, increment, loop_start,
- loop_end)
+precondition_loop_p (initial_value, final_value, increment, loop_start)
rtx *initial_value, *final_value, *increment;
- rtx loop_start, loop_end;
+ rtx loop_start;
{
if (loop_n_iterations > 0)