Warning fixes:

* calls.c (emit_call_1): Mark parameter `stack_size' with
	ATTRIBUTE_UNUSED.
	(expand_call): Initialize variable `insn'.
	(emit_library_call): Likewise for variable `high_to_save'.
	(emit_library_call_value): Likewise.
	(store_one_arg): Likewise for variables `lower_bound' and
	`upper_bound'.

	* combine.c (try_combine): Likewise for variables `i2_code_number'
	and `other_code_number'.
	(find_split_point): Likewise for variables `pos', `unsignedp' and
	`inner'.
	(simplify_if_then_else): Likewise for variables `op' and `c1'.
	(simplify_and_const_int): Remove unused variable `width'.
	(merge_outer_ops): Likewise.

	* cse.c (simplify_binary_operation): Cast an INTVAL() to `unsigned
	HOST_WIDE_INT' when comparing against one.
	(simplify_relational_operation): Likewise.
	(cse_insn): Initialize variables `src_eqv_volatile',
	`src_eqv_in_memory', `src_eqv_in_struct', `src_eqv_hash' and `sets'.

	* final.c (init_final): Constify parameter `filename'.
	(final_start_function): Mark parameter `optimize' with
	ATTRIBUTE_UNUSED.
	(profile_function): Likewise for parameters `first' and `optimize'.
	(output_source_line): Likewise for parameter `file'.

	* integrate.c (subst_constants): Cast a value to `size_t' when
	comparing against one.
	(mark_stores): Initialize variable `mode'.  Cast a value to
	`size_t' when comparing against one.

	* integrate.h (MAYBE_EXTEND_CONST_EQUIV_VARRAY): Likewise.

	* loop.c (move_movables): Initialize variable `first'.
	(strength_reduce): Likewise for variable `increment'.
	(check_dbra_loop): Likewise for variable `comparison_val'.  Cast a
	value to `size_t' when comparing against one.
	(load_mems): Initialize variable `end_label'.

	* output.h (init_final): Constify parameter.

	* reload.c (decompose): Initialize variable `base'.

	* reload1.c (reload): Likewise for variable `is_scalar'.
	(spill_hard_reg): Mark parameter `dumpfile' with ATTRIBUTE_UNUSED.
	(choose_reload_regs): Initialize variable `mode'.
	(emit_reload_insns): Likewise for variable `store_insn'.
	(reload_cse_noop_set_p): Mark parameter `insn' with
	ATTRIBUTE_UNUSED.
	(reload_combine): Initialize variable `set'.

	* unroll.c (unroll_loop): Likewise for variable `local_label'.
	(copy_loop_body): Cast a value to `size_t' when comparing against
	one.

	* varasm.c (assemble_variable): Initialize variable `size_tree'.
	(const_hash): Add an `else abort()' in an if-else-if-else sequence.
	(remove_from_pending_weak_list): Mark parameter `name' with
	ATTRIBUTE_UNUSED.

From-SVN: r28860
This commit is contained in:
Kaveh R. Ghazi 1999-08-25 13:37:46 +00:00 committed by Kaveh Ghazi
parent e797ff7048
commit 6a651371a7
13 changed files with 112 additions and 48 deletions

View File

@ -1,3 +1,67 @@
Wed Aug 25 09:32:31 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* calls.c (emit_call_1): Mark parameter `stack_size' with
ATTRIBUTE_UNUSED.
(expand_call): Initialize variable `insn'.
(emit_library_call): Likewise for variable `high_to_save'.
(emit_library_call_value): Likewise.
(store_one_arg): Likewise for variables `lower_bound' and
`upper_bound'.
* combine.c (try_combine): Likewise for variables `i2_code_number'
and `other_code_number'.
(find_split_point): Likewise for variables `pos', `unsignedp' and
`inner'.
(simplify_if_then_else): Likewise for variables `op' and `c1'.
(simplify_and_const_int): Remove unused variable `width'.
(merge_outer_ops): Likewise.
* cse.c (simplify_binary_operation): Cast an INTVAL() to `unsigned
HOST_WIDE_INT' when comparing against one.
(simplify_relational_operation): Likewise.
(cse_insn): Initialize variables `src_eqv_volatile',
`src_eqv_in_memory', `src_eqv_in_struct', `src_eqv_hash' and `sets'.
* final.c (init_final): Constify parameter `filename'.
(final_start_function): Mark parameter `optimize' with
ATTRIBUTE_UNUSED.
(profile_function): Likewise for parameters `first' and `optimize'.
(output_source_line): Likewise for parameter `file'.
* integrate.c (subst_constants): Cast a value to `size_t' when
comparing against one.
(mark_stores): Initialize variable `mode'. Cast a value to
`size_t' when comparing against one.
* integrate.h (MAYBE_EXTEND_CONST_EQUIV_VARRAY): Likewise.
* loop.c (move_movables): Initialize variable `first'.
(strength_reduce): Likewise for variable `increment'.
(check_dbra_loop): Likewise for variable `comparison_val'. Cast a
value to `size_t' when comparing against one.
(load_mems): Initialize variable `end_label'.
* output.h (init_final): Constify parameter.
* reload.c (decompose): Initialize variable `base'.
* reload1.c (reload): Likewise for variable `is_scalar'.
(spill_hard_reg): Mark parameter `dumpfile' with ATTRIBUTE_UNUSED.
(choose_reload_regs): Initialize variable `mode'.
(emit_reload_insns): Likewise for variable `store_insn'.
(reload_cse_noop_set_p): Mark parameter `insn' with
ATTRIBUTE_UNUSED.
(reload_combine): Initialize variable `set'.
* unroll.c (unroll_loop): Likewise for variable `local_label'.
(copy_loop_body): Cast a value to `size_t' when comparing against
one.
* varasm.c (assemble_variable): Initialize variable `size_tree'.
(const_hash): Add an `else abort()' in an if-else-if-else sequence.
(remove_from_pending_weak_list): Mark parameter `name' with
ATTRIBUTE_UNUSED.
Wed Aug 25 11:18:39 1999 Bernd Schmidt <bernds@cygnus.co.uk>
* toplev.c (rest_of_compilation): Use decl_printable_name when opening

View File

@ -380,7 +380,7 @@ emit_call_1 (funexp, fndecl, funtype, stack_size, rounded_stack_size,
rtx funexp;
tree fndecl ATTRIBUTE_UNUSED;
tree funtype ATTRIBUTE_UNUSED;
HOST_WIDE_INT stack_size;
HOST_WIDE_INT stack_size ATTRIBUTE_UNUSED;
HOST_WIDE_INT rounded_stack_size;
HOST_WIDE_INT struct_value_size;
rtx next_arg_reg;
@ -1792,7 +1792,7 @@ expand_call (exp, target, ignore)
{
rtx first_insn
= before_call ? NEXT_INSN (before_call) : get_insns ();
rtx insn, seq;
rtx insn = NULL_RTX, seq;
/* Look for a call in the inline function code.
If DECL_SAVED_INSNS (fndecl)->outgoing_args_size is
@ -2583,7 +2583,7 @@ emit_library_call VPROTO((rtx orgfun, int no_queue, enum machine_mode outmode,
#if defined(ACCUMULATE_OUTGOING_ARGS) && defined(REG_PARM_STACK_SPACE)
/* Define the boundary of the register parm stack space that needs to be
save, if any. */
int low_to_save = -1, high_to_save;
int low_to_save = -1, high_to_save = 0;
rtx save_area = 0; /* Place that it is saved */
#endif
@ -3082,7 +3082,7 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue,
#if defined(ACCUMULATE_OUTGOING_ARGS) && defined(REG_PARM_STACK_SPACE)
/* Define the boundary of the register parm stack space that needs to be
save, if any. */
int low_to_save = -1, high_to_save;
int low_to_save = -1, high_to_save = 0;
rtx save_area = 0; /* Place that it is saved */
#endif
@ -3694,7 +3694,7 @@ store_one_arg (arg, argblock, may_be_alloca, variable_size,
int partial = 0;
int used = 0;
#ifdef ACCUMULATE_OUTGOING_ARGS
int i, lower_bound, upper_bound;
int i, lower_bound = 0, upper_bound = 0;
#endif
if (TREE_CODE (pval) == ERROR_MARK)

View File

@ -1339,7 +1339,7 @@ try_combine (i3, i2, i1)
/* Nonzero is I2's body now appears in I3. */
int i2_is_used;
/* INSN_CODEs for new I3, new I2, and user of condition code. */
int insn_code_number, i2_code_number, other_code_number;
int insn_code_number, i2_code_number = 0, other_code_number = 0;
/* Contains I3 if the destination of I3 is used in its source, which means
that the old life of I3 is being killed. If that usage is placed into
I2 and not in I3, a REG_DEAD note must be made. */
@ -2593,8 +2593,8 @@ find_split_point (loc, insn)
rtx x = *loc;
enum rtx_code code = GET_CODE (x);
rtx *split;
int len = 0, pos, unsignedp;
rtx inner;
int len = 0, pos = 0, unsignedp = 0;
rtx inner = NULL_RTX;
/* First special-case some codes. */
switch (code)
@ -4457,9 +4457,9 @@ simplify_if_then_else (x)
rtx f = make_compound_operation (false, SET);
rtx cond_op0 = XEXP (cond, 0);
rtx cond_op1 = XEXP (cond, 1);
enum rtx_code op, extend_op = NIL;
enum rtx_code op = NIL, extend_op = NIL;
enum machine_mode m = mode;
rtx z = 0, c1;
rtx z = 0, c1 = NULL_RTX;
if ((GET_CODE (t) == PLUS || GET_CODE (t) == MINUS
|| GET_CODE (t) == IOR || GET_CODE (t) == XOR
@ -7323,7 +7323,6 @@ simplify_and_const_int (x, mode, varop, constop)
unsigned HOST_WIDE_INT constop;
{
unsigned HOST_WIDE_INT nonzero;
int width = GET_MODE_BITSIZE (mode);
int i;
/* Simplify VAROP knowing that we will be only looking at some of the
@ -8224,7 +8223,6 @@ merge_outer_ops (pop0, pconst0, op1, const1, mode, pcomp_p)
{
enum rtx_code op0 = *pop0;
HOST_WIDE_INT const0 = *pconst0;
int width = GET_MODE_BITSIZE (mode);
const0 &= GET_MODE_MASK (mode);
const1 &= GET_MODE_MASK (mode);

View File

@ -4198,7 +4198,7 @@ simplify_binary_operation (code, mode, op0, op1)
case ROTATE:
/* Rotating ~0 always results in ~0. */
if (GET_CODE (op0) == CONST_INT && width <= HOST_BITS_PER_WIDE_INT
&& INTVAL (op0) == GET_MODE_MASK (mode)
&& (unsigned HOST_WIDE_INT) INTVAL (op0) == GET_MODE_MASK (mode)
&& ! side_effects_p (op1))
return op0;
@ -4224,7 +4224,7 @@ simplify_binary_operation (code, mode, op0, op1)
case SMAX:
if (width <= HOST_BITS_PER_WIDE_INT && GET_CODE (op1) == CONST_INT
&& (INTVAL (op1)
&& ((unsigned HOST_WIDE_INT) INTVAL (op1)
== (unsigned HOST_WIDE_INT) GET_MODE_MASK (mode) >> 1)
&& ! side_effects_p (op0))
return op1;
@ -4839,14 +4839,14 @@ simplify_relational_operation (code, mode, op0, op1)
/* Unsigned values are never greater than the largest
unsigned value. */
if (GET_CODE (op1) == CONST_INT
&& INTVAL (op1) == GET_MODE_MASK (mode)
&& (unsigned HOST_WIDE_INT) INTVAL (op1) == GET_MODE_MASK (mode)
&& INTEGRAL_MODE_P (mode))
return const_true_rtx;
break;
case GTU:
if (GET_CODE (op1) == CONST_INT
&& INTVAL (op1) == GET_MODE_MASK (mode)
&& (unsigned HOST_WIDE_INT) INTVAL (op1) == GET_MODE_MASK (mode)
&& INTEGRAL_MODE_P (mode))
return const0_rtx;
break;
@ -6377,12 +6377,12 @@ cse_insn (insn, libcall_insn)
rtx src_eqv = 0;
struct table_elt *src_eqv_elt = 0;
int src_eqv_volatile;
int src_eqv_in_memory;
int src_eqv_in_struct;
unsigned src_eqv_hash;
int src_eqv_volatile = 0;
int src_eqv_in_memory = 0;
int src_eqv_in_struct = 0;
unsigned src_eqv_hash = 0;
struct set *sets;
struct set *sets = NULL_PTR;
this_insn = insn;

View File

@ -314,7 +314,7 @@ extern char *getpwd ();
void
init_final (filename)
char *filename;
const char *filename ATTRIBUTE_UNUSED;
{
next_block_index = 2;
app_on = 0;
@ -1598,7 +1598,7 @@ void
final_start_function (first, file, optimize)
rtx first;
FILE *file;
int optimize;
int optimize ATTRIBUTE_UNUSED;
{
block_depth = 0;
@ -1790,9 +1790,9 @@ profile_function (file)
void
final_end_function (first, file, optimize)
rtx first;
rtx first ATTRIBUTE_UNUSED;
FILE *file;
int optimize;
int optimize ATTRIBUTE_UNUSED;
{
if (app_on)
{
@ -2982,7 +2982,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
static void
output_source_line (file, insn)
FILE *file;
FILE *file ATTRIBUTE_UNUSED;
rtx insn;
{
register char *filename = NOTE_SOURCE_FILE (insn);

View File

@ -2859,7 +2859,7 @@ subst_constants (loc, insn, map)
struct const_equiv_data *p;
if (! (regno < FIRST_PSEUDO_REGISTER && REG_USERVAR_P (x))
&& regno < VARRAY_SIZE (map->const_equiv_varray)
&& (size_t) regno < VARRAY_SIZE (map->const_equiv_varray)
&& (p = &VARRAY_CONST_EQUIV (map->const_equiv_varray, regno),
p->rtx != 0)
&& p->age >= map->const_age)
@ -3087,7 +3087,7 @@ mark_stores (dest, x)
rtx x ATTRIBUTE_UNUSED;
{
int regno = -1;
enum machine_mode mode;
enum machine_mode mode = VOIDmode;
/* DEST is always the innermost thing set, except in the case of
SUBREGs of hard registers. */
@ -3111,7 +3111,7 @@ mark_stores (dest, x)
if (regno != VIRTUAL_INCOMING_ARGS_REGNUM
&& regno != VIRTUAL_STACK_VARS_REGNUM)
for (i = regno; i <= last_reg; i++)
if (i < VARRAY_SIZE (global_const_equiv_varray))
if ((size_t) i < VARRAY_SIZE (global_const_equiv_varray))
VARRAY_CONST_EQUIV (global_const_equiv_varray, i).rtx = 0;
}
}

View File

@ -134,7 +134,7 @@ extern varray_type global_const_equiv_varray;
#define MAYBE_EXTEND_CONST_EQUIV_VARRAY(MAP,MAX) \
{ \
if ((MAX) >= VARRAY_SIZE ((MAP)->const_equiv_varray)) \
if ((size_t)(MAX) >= VARRAY_SIZE ((MAP)->const_equiv_varray)) \
{ \
int is_global = (global_const_equiv_varray \
== (MAP)->const_equiv_varray); \

View File

@ -1838,7 +1838,7 @@ move_movables (movables, threshold, insn_count, loop_start, end, nregs)
{
int count;
register struct movable *m1;
rtx first;
rtx first = NULL_RTX;
/* Now move the insns that set the reg. */
@ -4017,7 +4017,7 @@ strength_reduce (scan_start, end, loop_top, insn_count,
else
{
struct iv_class *bl2 = 0;
rtx increment;
rtx increment = NULL_RTX;
/* Biv initial value is not a simple move. If it is the sum of
another biv and a constant, check if both bivs are incremented
@ -7901,7 +7901,7 @@ check_dbra_loop (loop_end, insn_count, loop_start, loop_info)
|| (GET_CODE (comparison) == LE
&& no_use_except_counting)))
{
HOST_WIDE_INT add_val, add_adjust, comparison_val;
HOST_WIDE_INT add_val, add_adjust, comparison_val = 0;
rtx initial_value, comparison_value;
int nonneg = 0;
enum rtx_code cmp_code;
@ -8173,7 +8173,7 @@ check_dbra_loop (loop_end, insn_count, loop_start, loop_info)
REG_EQUAL notes should still be correct. */
if (! set
|| GET_CODE (SET_DEST (set)) != REG
|| REGNO (SET_DEST (set)) >= reg_iv_type->num_elements
|| (size_t) REGNO (SET_DEST (set)) >= reg_iv_type->num_elements
|| REG_IV_TYPE (REGNO (SET_DEST (set))) != GENERAL_INDUCT
|| REG_IV_INFO (REGNO (SET_DEST (set)))->src_reg != bl->biv->src_reg)
for (pnote = &REG_NOTES (p); *pnote;)
@ -9509,7 +9509,7 @@ load_mems (scan_start, end, loop_top, start)
int i;
rtx p;
rtx label = NULL_RTX;
rtx end_label;
rtx end_label = NULL_RTX;
if (loop_mems_idx > 0)
{

View File

@ -20,7 +20,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Initialize data in final at the beginning of a compilation. */
extern void init_final PROTO((char *));
extern void init_final PROTO((const char *));
/* Called at end of source file,
to output the block-profiling table for this entire compilation. */

View File

@ -2226,7 +2226,7 @@ decompose (x)
val.base = 0;
if (GET_CODE (x) == MEM)
{
rtx base, offset = 0;
rtx base = NULL_RTX, offset = 0;
rtx addr = XEXP (x, 0);
if (GET_CODE (addr) == PRE_DEC || GET_CODE (addr) == PRE_INC

View File

@ -1089,7 +1089,7 @@ reload (first, global, dumpfile)
{
rtx addr = 0;
int in_struct = 0;
int is_scalar;
int is_scalar = 0;
int is_readonly = 0;
if (reg_equiv_memory_loc[i])
@ -3794,7 +3794,7 @@ init_elim_table ()
static void
spill_hard_reg (regno, dumpfile, cant_eliminate)
register int regno;
FILE *dumpfile;
FILE *dumpfile ATTRIBUTE_UNUSED;
int cant_eliminate;
{
register int i;
@ -5845,7 +5845,7 @@ choose_reload_regs (chain)
{
int word = 0;
register int regno = -1;
enum machine_mode mode;
enum machine_mode mode = VOIDmode;
if (reload_in[r] == 0)
;
@ -7622,7 +7622,7 @@ emit_reload_insns (chain)
register int nregno = REGNO (out);
if (nregno >= FIRST_PSEUDO_REGISTER)
{
rtx src_reg, store_insn;
rtx src_reg, store_insn = NULL_RTX;
reg_last_reload_reg[nregno] = 0;
@ -8968,7 +8968,7 @@ reload_cse_regno_equal_p (regno, val, mode)
static int
reload_cse_noop_set_p (set, insn)
rtx set;
rtx insn;
rtx insn ATTRIBUTE_UNUSED;
{
rtx src, dest;
enum machine_mode dest_mode;
@ -9650,7 +9650,7 @@ reload_combine ()
rtx prev = prev_nonnote_insn (insn);
rtx prev_set = prev ? single_set (prev) : NULL_RTX;
int regno = REGNO (reg);
rtx const_reg;
rtx const_reg = NULL_RTX;
rtx reg_sum = NULL_RTX;
/* Now, we need an index register.
@ -10074,7 +10074,7 @@ reload_cse_move2add (first)
&& reg_set_luid[regno] > reg_set_luid[REGNO (src)])
{
rtx next = next_nonnote_insn (insn);
rtx set;
rtx set = NULL_RTX;
if (next)
set = single_set (next);
if (next

View File

@ -237,7 +237,7 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
int max_labelno, max_insnno;
rtx insert_before;
struct inline_remap *map;
char *local_label;
char *local_label = NULL;
char *local_regno;
int max_local_regnum;
int maxregnum;
@ -1963,7 +1963,7 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
{
int regno = REGNO (SET_DEST (pattern));
if (regno < VARRAY_SIZE (map->const_equiv_varray)
if ((size_t) regno < VARRAY_SIZE (map->const_equiv_varray)
&& (VARRAY_CONST_EQUIV (map->const_equiv_varray, regno).age
== map->const_age))
VARRAY_CONST_EQUIV (map->const_equiv_varray, regno).age = -1;

View File

@ -1159,7 +1159,7 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
{
register char *name;
unsigned int align;
tree size_tree;
tree size_tree = NULL_TREE;
int reloc = 0;
enum in_section saved_in_section;
@ -2355,6 +2355,8 @@ const_hash (exp)
}
else if (GET_CODE (value.base) == LABEL_REF)
hi = value.offset + CODE_LABEL_NUMBER (XEXP (value.base, 0)) * 13;
else
abort();
hi &= (1 << HASHBITS) - 1;
hi %= MAX_HASH_TABLE;
@ -4383,7 +4385,7 @@ weak_finish ()
some assemblers. */
static void
remove_from_pending_weak_list (name)
char *name;
char *name ATTRIBUTE_UNUSED;
{
#ifdef HANDLE_PRAGMA_WEAK
if (HANDLE_PRAGMA_WEAK)