Commit 47c3ed98 by Kaveh R. Ghazi Committed by Kaveh Ghazi

Warning fixes:

        * loop.c (insert_bct): Hide the definition of variables
        `increment_direction', `compare_direction', `add_iteration' and
        `loop_var_mode'.
        * recog.c (mode_dependent_address_p): Mark parameter `addr' with
        ATTRIBUTE_UNUSED.  Mark label `win' with ATTRIBUTE_UNUSED_LABEL.
        (mode_independent_operand): Mark label `lose' with
        ATTRIBUTE_UNUSED_LABEL.
        * regclass.c (n_occurrences): Remove prototype and definition.
        * reload.c (find_reloads_address_1): Mark variable `tem' with
        ATTRIBUTE_UNUSED.
        * reload1.c (reload): Cast the first two arguments of `bcopy' to PTR.
        * sbitmap.c (sbitmap_copy): Likewise.
        * scan-decls.c (scan_decls): Hide label `handle_comma'.
        * toplev.c (output_lang_identify): Mark prototype with
        ATTRIBUTE_UNUSED.
        * tree.c (make_node): Cast the first argument of `bzero' to PTR.
        (make_tree_vec): Likewise.
        (build1): Likewise.
        * varasm.c (assemble_static_space): Mark variable `tem' with
        ATTRIBUTE_UNUSED.

From-SVN: r24740
parent 044357a0
Mon Jan 18 09:05:37 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* loop.c (insert_bct): Hide the definition of variables
`increment_direction', `compare_direction', `add_iteration' and
`loop_var_mode'.
* recog.c (mode_dependent_address_p): Mark parameter `addr' with
ATTRIBUTE_UNUSED. Mark label `win' with ATTRIBUTE_UNUSED_LABEL.
(mode_independent_operand): Mark label `lose' with
ATTRIBUTE_UNUSED_LABEL.
* regclass.c (n_occurrences): Remove prototype and definition.
* reload.c (find_reloads_address_1): Mark variable `tem' with
ATTRIBUTE_UNUSED.
* reload1.c (reload): Cast the first two arguments of `bcopy' to PTR.
* sbitmap.c (sbitmap_copy): Likewise.
* scan-decls.c (scan_decls): Hide label `handle_comma'.
* toplev.c (output_lang_identify): Mark prototype with
ATTRIBUTE_UNUSED.
* tree.c (make_node): Cast the first argument of `bzero' to PTR.
(make_tree_vec): Likewise.
(build1): Likewise.
* varasm.c (assemble_static_space): Mark variable `tem' with
ATTRIBUTE_UNUSED.
Mon Jan 18 04:28:36 1999 Nathan Sidwell <nathan@acm.org> Mon Jan 18 04:28:36 1999 Nathan Sidwell <nathan@acm.org>
* Makefile.in (GCOV_INSTALL_NAME): New macro. * Makefile.in (GCOV_INSTALL_NAME): New macro.
......
...@@ -7944,6 +7944,7 @@ insert_bct (loop_start, loop_end, loop_info) ...@@ -7944,6 +7944,7 @@ insert_bct (loop_start, loop_end, loop_info)
int i; int i;
unsigned HOST_WIDE_INT n_iterations; unsigned HOST_WIDE_INT n_iterations;
#if 0
int increment_direction, compare_direction; int increment_direction, compare_direction;
/* If the loop condition is <= or >=, the number of iteration /* If the loop condition is <= or >=, the number of iteration
...@@ -7951,6 +7952,7 @@ insert_bct (loop_start, loop_end, loop_info) ...@@ -7951,6 +7952,7 @@ insert_bct (loop_start, loop_end, loop_info)
int add_iteration = 0; int add_iteration = 0;
enum machine_mode loop_var_mode = word_mode; enum machine_mode loop_var_mode = word_mode;
#endif
int loop_num = uid_loop_num [INSN_UID (loop_start)]; int loop_num = uid_loop_num [INSN_UID (loop_start)];
......
...@@ -1861,11 +1861,12 @@ offsettable_address_p (strictp, mode, y) ...@@ -1861,11 +1861,12 @@ offsettable_address_p (strictp, mode, y)
int int
mode_dependent_address_p (addr) mode_dependent_address_p (addr)
rtx addr; rtx addr ATTRIBUTE_UNUSED; /* Maybe used in GO_IF_MODE_DEPENDENT_ADDRESS. */
{ {
GO_IF_MODE_DEPENDENT_ADDRESS (addr, win); GO_IF_MODE_DEPENDENT_ADDRESS (addr, win);
return 0; return 0;
win: /* Label `win' might (not) be used via GO_IF_MODE_DEPENDENT_ADDRESS. */
win: ATTRIBUTE_UNUSED_LABEL
return 1; return 1;
} }
...@@ -1888,7 +1889,8 @@ mode_independent_operand (op, mode) ...@@ -1888,7 +1889,8 @@ mode_independent_operand (op, mode)
addr = XEXP (op, 0); addr = XEXP (op, 0);
GO_IF_MODE_DEPENDENT_ADDRESS (addr, lose); GO_IF_MODE_DEPENDENT_ADDRESS (addr, lose);
return 1; return 1;
lose: /* Label `lose' might (not) be used via GO_IF_MODE_DEPENDENT_ADDRESS. */
lose: ATTRIBUTE_UNUSED_LABEL
return 0; return 0;
} }
......
...@@ -691,7 +691,6 @@ static int loop_depth; ...@@ -691,7 +691,6 @@ static int loop_depth;
static int loop_cost; static int loop_cost;
static int n_occurrences PROTO((int, char *));
static rtx scan_one_insn PROTO((rtx, int)); static rtx scan_one_insn PROTO((rtx, int));
static void record_reg_classes PROTO((int, int, rtx *, enum machine_mode *, static void record_reg_classes PROTO((int, int, rtx *, enum machine_mode *,
char **, rtx)); char **, rtx));
...@@ -742,18 +741,6 @@ regclass_init () ...@@ -742,18 +741,6 @@ regclass_init ()
prefclass = 0; prefclass = 0;
} }
/* Return the number of times character C occurs in string S. */
static int
n_occurrences (c, s)
int c;
char *s;
{
int n = 0;
while (*s)
n += (*s++ == c);
return n;
}
/* Subroutine of regclass, processes one insn INSN. Scan it and record each /* Subroutine of regclass, processes one insn INSN. Scan it and record each
time it would save code to put a certain register in a certain class. time it would save code to put a certain register in a certain class.
PASS, when nonzero, inhibits some optimizations which need only be done PASS, when nonzero, inhibits some optimizations which need only be done
......
/* Search an insn for pseudo regs that must be in hard regs and are not. /* Search an insn for pseudo regs that must be in hard regs and are not.
Copyright (C) 1987, 88, 89, 92-97, 1998 Free Software Foundation, Inc. Copyright (C) 1987, 88, 89, 92-98, 1999 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -5318,7 +5318,8 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn) ...@@ -5318,7 +5318,8 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn)
of an equivalent address for a pseudo that was not allocated to a of an equivalent address for a pseudo that was not allocated to a
hard register. Verify that the specified address is valid and hard register. Verify that the specified address is valid and
reload it into a register. */ reload it into a register. */
rtx tem = XEXP (x, 0); /* Variable `tem' might or might not be used in FIND_REG_INC_NOTE. */
rtx tem ATTRIBUTE_UNUSED = XEXP (x, 0);
register rtx link; register rtx link;
int reloadnum; int reloadnum;
......
...@@ -662,7 +662,7 @@ reload (first, global, dumpfile) ...@@ -662,7 +662,7 @@ reload (first, global, dumpfile)
reg_max_ref_width = (int *) xmalloc (max_regno * sizeof (int)); reg_max_ref_width = (int *) xmalloc (max_regno * sizeof (int));
bzero ((char *) reg_max_ref_width, max_regno * sizeof (int)); bzero ((char *) reg_max_ref_width, max_regno * sizeof (int));
reg_old_renumber = (short *) xmalloc (max_regno * sizeof (short)); reg_old_renumber = (short *) xmalloc (max_regno * sizeof (short));
bcopy (reg_renumber, reg_old_renumber, max_regno * sizeof (short)); bcopy ((PTR) reg_renumber, (PTR) reg_old_renumber, max_regno * sizeof (short));
pseudo_forbidden_regs pseudo_forbidden_regs
= (HARD_REG_SET *) xmalloc (max_regno * sizeof (HARD_REG_SET)); = (HARD_REG_SET *) xmalloc (max_regno * sizeof (HARD_REG_SET));
pseudo_previous_regs pseudo_previous_regs
......
...@@ -96,7 +96,8 @@ void ...@@ -96,7 +96,8 @@ void
sbitmap_copy (dst, src) sbitmap_copy (dst, src)
sbitmap dst, src; sbitmap dst, src;
{ {
bcopy (src->elms, dst->elms, sizeof (SBITMAP_ELT_TYPE) * dst->size); bcopy ((PTR) src->elms, (PTR) dst->elms,
sizeof (SBITMAP_ELT_TYPE) * dst->size);
} }
/* Zero all elements in a bitmap. */ /* Zero all elements in a bitmap. */
......
/* scan-decls.c - Extracts declarations from cpp output. /* scan-decls.c - Extracts declarations from cpp output.
Copyright (C) 1993, 1995, 1997, 1998 Free Software Foundation, Inc. Copyright (C) 1993, 1995, 97-98, 1999 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the under the terms of the GNU General Public License as published by the
...@@ -189,7 +189,9 @@ scan_decls (pfile, argc, argv) ...@@ -189,7 +189,9 @@ scan_decls (pfile, argc, argv)
maybe_handle_comma: maybe_handle_comma:
if (token != CPP_COMMA) if (token != CPP_COMMA)
goto new_statement; goto new_statement;
#if 0
handle_comma: handle_comma:
#endif
/* Handle multiple declarators in a single declaration, /* Handle multiple declarators in a single declaration,
as in: extern char *strcpy (), *strcat (), ... ; */ as in: extern char *strcpy (), *strcat (), ... ; */
if (declarator_start == 0) if (declarator_start == 0)
......
...@@ -197,7 +197,8 @@ static void v_really_sorry PROTO((char *, va_list)) ATTRIBUTE_NORETURN; ...@@ -197,7 +197,8 @@ static void v_really_sorry PROTO((char *, va_list)) ATTRIBUTE_NORETURN;
static void float_signal PROTO((int)) ATTRIBUTE_NORETURN; static void float_signal PROTO((int)) ATTRIBUTE_NORETURN;
static void pipe_closed PROTO((int)) ATTRIBUTE_NORETURN; static void pipe_closed PROTO((int)) ATTRIBUTE_NORETURN;
#ifdef ASM_IDENTIFY_LANGUAGE #ifdef ASM_IDENTIFY_LANGUAGE
static void output_lang_identify PROTO((FILE *)); /* This might or might not be used in ASM_IDENTIFY_LANGUAGE. */
static void output_lang_identify PROTO((FILE *)) ATTRIBUTE_UNUSED;
#endif #endif
static void open_dump_file PROTO((char *, char *)); static void open_dump_file PROTO((char *, char *));
static void close_dump_file PROTO((void (*) (FILE *, rtx), rtx)); static void close_dump_file PROTO((void (*) (FILE *, rtx), rtx));
......
...@@ -1070,7 +1070,7 @@ make_node (code) ...@@ -1070,7 +1070,7 @@ make_node (code)
} }
t = (tree) obstack_alloc (obstack, length); t = (tree) obstack_alloc (obstack, length);
bzero (t, length); bzero ((PTR) t, length);
#ifdef GATHER_STATISTICS #ifdef GATHER_STATISTICS
tree_node_counts[(int)kind]++; tree_node_counts[(int)kind]++;
...@@ -1551,7 +1551,7 @@ make_tree_vec (len) ...@@ -1551,7 +1551,7 @@ make_tree_vec (len)
#endif #endif
t = (tree) obstack_alloc (obstack, length); t = (tree) obstack_alloc (obstack, length);
bzero (t, length); bzero ((PTR) t, length);
TREE_SET_CODE (t, TREE_VEC); TREE_SET_CODE (t, TREE_VEC);
TREE_VEC_LENGTH (t) = len; TREE_VEC_LENGTH (t) = len;
...@@ -3058,7 +3058,7 @@ build1 (code, type, node) ...@@ -3058,7 +3058,7 @@ build1 (code, type, node)
length = sizeof (struct tree_exp); length = sizeof (struct tree_exp);
t = (tree) obstack_alloc (obstack, length); t = (tree) obstack_alloc (obstack, length);
bzero (t, length); bzero ((PTR) t, length);
#ifdef GATHER_STATISTICS #ifdef GATHER_STATISTICS
tree_node_counts[(int)kind]++; tree_node_counts[(int)kind]++;
......
/* Output variables, constants and external declarations, for GNU compiler. /* Output variables, constants and external declarations, for GNU compiler.
Copyright (C) 1987, 88, 89, 92-97, 1998 Free Software Foundation, Inc. Copyright (C) 1987, 88, 89, 92-98, 1999 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -1711,7 +1711,9 @@ assemble_static_space (size) ...@@ -1711,7 +1711,9 @@ assemble_static_space (size)
{ {
/* Round size up to multiple of BIGGEST_ALIGNMENT bits /* Round size up to multiple of BIGGEST_ALIGNMENT bits
so that each uninitialized object starts on such a boundary. */ so that each uninitialized object starts on such a boundary. */
int rounded = ((size + (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1) /* Variable `rounded' might or might not be used in ASM_OUTPUT_LOCAL. */
int rounded ATTRIBUTE_UNUSED
= ((size + (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1)
/ (BIGGEST_ALIGNMENT / BITS_PER_UNIT) / (BIGGEST_ALIGNMENT / BITS_PER_UNIT)
* (BIGGEST_ALIGNMENT / BITS_PER_UNIT)); * (BIGGEST_ALIGNMENT / BITS_PER_UNIT));
ASM_OUTPUT_LOCAL (asm_out_file, name, size, rounded); ASM_OUTPUT_LOCAL (asm_out_file, name, size, rounded);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment