egcs-980221, more general warning fixes
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Tue Feb 24 11:46:00 GMT 1998
This patch silences around 250 more warnings relative to the
egcs-980221 snapshot.
--Kaveh
Mon Feb 23 17:46:14 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* c-aux-info.c: Include string.h/strings.h.
* pa.c: Include stdlib.h.
(pa_combine_instructions): Prototype the function.
(pa_can_combine_p, forward_branch_p, shadd_constant_p): Likewise.
(reloc_needed): Add default case for enumeration switch.
(remove_useless_addtr_insns): Remove unused variable `all'.
(hppa_expand_prologue): Add explicit braces to avoid ambiguous
`else'.
(output_function_epilogue): Remove unused variable `i'.
(output_millicode_call): Remove unused variable `link'.
(shadd_constant_p, forward_branch_p): Make the function static.
(following_call): Explicitly declare to return int.
(pa_reorg): Declare as void.
(pa_combine_instructions): Declare as static void. Add
parentheses around && within ||.
* pa.h: Add prototypes for pa_reorg, symbolic_operand,
following_call, function_label_operand, lhs_lshift_cint_operand
and zdepi_cint_p.
(CONST_COSTS): Add parentheses around && within ||.
* pa.md: Add parentheses around && within ||.
* cppalloc.c: Include stdlib.h.
* cpperror.c (cpp_print_containing_files): Remove unused variable
`i'. Fix format specifier in fprintf.
* cse.c (cse_around_loop): Add explicit braces to avoid ambiguous
`else'.
(delete_dead_from_cse): Wrap variable `tem' in macro HAVE_cc0.
* expr.c (expand_expr): Add parentheses around && within ||.
* final.c (app_enable): Replace fprintf with fputs where there are
no format specifiers and no trailing argument after the string.
Eg, when printing ASM_APP_ON/ASM_APP_OFF.
(app_disable): Likewise.
(final_end_function): Likewise.
(final_scan_insn): Likewise. Remove unused variable `set'.
(profile_function): Wrap empty if-statement body in {} brackets.
* function.c: Include stdlib.h.
(pad_below): Wrap prototype and definition in ARGS_GROW_DOWNWARD.
(reposition_prologue_and_epilogue_notes): Add parentheses around
assignment used as truth value.
* integrate.c (expand_inline_function): Wrap variable `cc0_insn'
in macro HAVE_cc0.
* jump.c (jump_optimize): Wrap variable `q' in macro HAVE_cc0.
Remove unused variable `prev1'.
* libgcc2.c (__bb_exit_trace_func): Add parentheses around &&
within ||. Fix format specifier in fprintf.
(__bb_init_prg): Add parentheses around assignment used as truth
value.
* local-alloc.c: Include stdlib.h.
(requires_inout): Add parentheses around assignment used as truth
value.
* loop.c (analyze_loop_iterations): Wrap prototype and definition
in macro HAVE_decrement_and_branch_on_count.
(insert_bct, instrument_loop_bct): Likewise.
(move_movables): Add parentheses around assignment used as truth
value.
(consec_sets_invariant_p): Likewise.
(maybe_eliminate_biv_1): Wrap variable `new' in macro HAVE_cc0.
* objc/objc-act.c: Include stdlib.h.
(lookup_method_in_protocol_list): Wrap empty else-statement body
in braces.
(lookup_protocol_in_reflist): Likewise.
(objc_add_static_instance): Remove unused variables `decl_expr'
and `decl_spec'.
(get_objc_string_decl): Remove unused variable `decl'.
(generate_static_references): Remove unused variables `idecl' and
`instance'.
(check_protocols): Wrap empty else-statement body
in braces.
* protoize.c: Include stdlib.h.
(substr): Add parentheses around assignment used as truth value.
(abspath): Likewise.
(shortpath): Likewise.
* regmove.c (fixup_match_1): Add parentheses around assignment
used as truth value.
* reload.c (push_secondary_reload): Remove unused variable `i'.
(find_reloads): Add parentheses around assignment used as truth
value.
* reload1.c: Include stdlib.h.
* rtl.h: Correct typo in prototype of offsettable_memref_p.
* stmt.c (add_case_node): Add parentheses around assignment used
as truth value.
(case_tree2list): Likewise.
* tree.c (valid_machine_attribute): Wrap variable `decl_attr_list'
in macro VALID_MACHINE_DECL_ATTRIBUTE. Wrap variable
`type_attr_list' in macro VALID_MACHINE_TYPE_ATTRIBUTE.
(merge_attributes): Add explicit braces to avoid ambiguous `else'.
* unroll.c (copy_loop_body): Wrap variable `cc0_insn' in macro
HAVE_cc0.
* varasm.c: Include stdlib.h.
diff -r -u orig/egcs-980221/gcc/c-aux-info.c egcs-980221/gcc/c-aux-info.c
--- orig/egcs-980221/gcc/c-aux-info.c Sat Dec 6 12:18:56 1997
+++ egcs-980221/gcc/c-aux-info.c Mon Feb 23 17:13:26 1998
@@ -23,6 +23,13 @@
#include "config.h"
#include <stdio.h>
+#ifdef HAVE_STRING_H
+# include <string.h>
+#else
+# ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#endif
#include "flags.h"
#include "tree.h"
#include "c-tree.h"
diff -r -u orig/egcs-980221/gcc/config/pa/pa.c egcs-980221/gcc/config/pa/pa.c
--- orig/egcs-980221/gcc/config/pa/pa.c Sun Dec 21 15:55:52 1997
+++ egcs-980221/gcc/config/pa/pa.c Mon Feb 23 14:22:04 1998
@@ -21,6 +21,9 @@
#include "config.h"
#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#include "rtl.h"
#include "regs.h"
#include "hard-reg-set.h"
@@ -39,6 +42,10 @@
static void restore_unscaled_index_insn_codes PROTO((rtx));
static void record_unscaled_index_insn_codes PROTO((rtx));
+static void pa_combine_instructions PROTO((rtx));
+static int pa_can_combine_p PROTO((rtx, rtx, rtx, int, rtx, rtx, rtx));
+static int forward_branch_p PROTO((rtx));
+static int shadd_constant_p PROTO((int));
/* Save the operands last given to a compare for use when we
generate a scc or bcc insn. */
@@ -1445,6 +1452,9 @@
case ERROR_MARK:
break;
+
+ default:
+ break;
}
return reloc;
}
@@ -2195,7 +2205,6 @@
int check_notes;
{
rtx insn;
- int all;
static int pass = 0;
/* This is fairly cheap, so always run it when optimizing. */
@@ -2712,6 +2721,7 @@
/* Allocate the local frame and set up the frame pointer if needed. */
if (actual_fsize)
+ {
if (frame_pointer_needed)
{
/* Copy the old frame pointer temporarily into %r1. Set up the
@@ -2756,6 +2766,8 @@
STACK_POINTER_REGNUM,
actual_fsize);
}
+ }
+
/* The hppa calling conventions say that that %r19, the pic offset
register, is saved at sp - 32 (in this function's frame) when
generating PIC code. FIXME: What is the correct thing to do
@@ -2923,7 +2935,6 @@
int size;
{
rtx insn = get_last_insn ();
- int i;
/* hppa_expand_epilogue does the dirty work now. We just need
to output the assembler directives which denote the end
@@ -5067,7 +5078,6 @@
{
int delay_insn_deleted = 0;
rtx xoperands[2];
- rtx link;
/* We need to emit an inline long-call branch. */
if (dbr_sequence_length () != 0
@@ -5618,7 +5628,7 @@
/* Return 1 if the given constant is 2, 4, or 8. These are the valid
constants for shadd instructions. */
-int
+static int
shadd_constant_p (val)
int val;
{
@@ -5694,7 +5704,7 @@
/* Return 1 if INSN branches forward. Should be using insn_addresses
to avoid walking through all the insns... */
-int
+static int
forward_branch_p (insn)
rtx insn;
{
@@ -5823,6 +5833,7 @@
immediately follows a call since the jump can usually be eliminated
completely by modifying RP in the delay slot of the call. */
+int
following_call (insn)
rtx insn;
{
@@ -5969,6 +5980,7 @@
insns mark where we should emit .begin_brtab and .end_brtab directives
when using GAS (allows for better link time optimizations). */
+void
pa_reorg (insns)
rtx insns;
{
@@ -6110,6 +6122,7 @@
is an insns away). These are difficult to use due to the
branch length restrictions. */
+static void
pa_combine_instructions (insns)
rtx insns;
{
@@ -6135,9 +6148,9 @@
/* We only care about INSNs, JUMP_INSNs, and CALL_INSNs.
Also ignore any special USE insns. */
- if (GET_CODE (anchor) != INSN
+ if ((GET_CODE (anchor) != INSN
&& GET_CODE (anchor) != JUMP_INSN
- && GET_CODE (anchor) != CALL_INSN
+ && GET_CODE (anchor) != CALL_INSN)
|| GET_CODE (PATTERN (anchor)) == USE
|| GET_CODE (PATTERN (anchor)) == CLOBBER
|| GET_CODE (PATTERN (anchor)) == ADDR_VEC
diff -r -u orig/egcs-980221/gcc/config/pa/pa.h egcs-980221/gcc/config/pa/pa.h
--- orig/egcs-980221/gcc/config/pa/pa.h Wed Feb 18 07:38:29 1998
+++ egcs-980221/gcc/config/pa/pa.h Mon Feb 23 15:56:17 1998
@@ -273,6 +273,17 @@
/* Machine dependent reorg pass. */
#define MACHINE_DEPENDENT_REORG(X) pa_reorg(X)
+/* Prototype function used in MACHINE_DEPENDENT_REORG macro. */
+void pa_reorg ();
+
+/* Prototype function used in various macros. */
+int symbolic_operand ();
+
+/* Used in insn-*.c. */
+int following_call ();
+int function_label_operand ();
+int lhs_lshift_cint_operand ();
+
/* Names to predefine in the preprocessor for this target machine. */
#define CPP_PREDEFINES "-Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -Dunix -Dhp9000 -Dhp800 -Dspectrum -DREVARGV -Asystem(unix) -Asystem(bsd) -Acpu(hppa) -Amachine(hppa)"
@@ -755,6 +766,9 @@
: (C) == 'P' ? and_mask_p (VALUE) \
: 0)
+/* Prototype function used in macro CONST_OK_FOR_LETTER_P. */
+int zdepi_cint_p ();
+
/* Similar, but for floating or large integer constants, and defining letters
G and H. Here VALUE is the CONST_DOUBLE rtx itself.
@@ -1822,8 +1836,8 @@
case SYMBOL_REF: \
return 4; \
case CONST_DOUBLE: \
- if (RTX == CONST0_RTX (DFmode) || RTX == CONST0_RTX (SFmode)\
- && OUTER_CODE != SET) \
+ if (RTX == CONST0_RTX (DFmode) || \
+ (RTX == CONST0_RTX (SFmode) && OUTER_CODE != SET)) \
return 0; \
else \
return 8;
diff -r -u orig/egcs-980221/gcc/config/pa/pa.md egcs-980221/gcc/config/pa/pa.md
--- orig/egcs-980221/gcc/config/pa/pa.md Fri Dec 12 05:31:22 1997
+++ egcs-980221/gcc/config/pa/pa.md Mon Feb 23 16:31:33 1998
@@ -4495,7 +4495,7 @@
(match_operand:SI 2 "uint5_operand" ""))
(match_operand:SI 3 "const_int_operand" ""))]
"(INTVAL (operands[3]) & 0x10) != 0 &&
- (~INTVAL (operands[3]) & (1L << INTVAL (operands[1])) - 1 & ~0xf) == 0"
+ (~INTVAL (operands[3]) & ((1L << INTVAL (operands[1])) - 1) & ~0xf) == 0"
"*
{
operands[3] = GEN_INT ((INTVAL (operands[3]) & 0xf) - 0x10);
@@ -4665,7 +4665,7 @@
(set (match_operand:SI 0 "register_operand" "=r")
(plus:SI (match_operand:SI 1 "register_operand" "r")
(match_operand:SI 2 "ireg_or_int5_operand" "rL")))]
- "reload_completed && operands[0] == operands[1] || operands[0] == operands[2]"
+ "(reload_completed && operands[0] == operands[1]) || operands[0] == operands[2]"
"*
{
return output_parallel_addb (operands, get_attr_length (insn));
diff -r -u orig/egcs-980221/gcc/cppalloc.c egcs-980221/gcc/cppalloc.c
--- orig/egcs-980221/gcc/cppalloc.c Mon Aug 11 11:57:05 1997
+++ egcs-980221/gcc/cppalloc.c Mon Feb 23 17:07:44 1998
@@ -24,6 +24,9 @@
#include "config.h"
#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#include "cpplib.h"
static void
diff -r -u orig/egcs-980221/gcc/cpperror.c egcs-980221/gcc/cpperror.c
--- orig/egcs-980221/gcc/cpperror.c Mon Aug 11 11:57:05 1997
+++ egcs-980221/gcc/cpperror.c Mon Feb 23 14:46:52 1998
@@ -37,7 +37,6 @@
cpp_reader *pfile;
{
cpp_buffer *ip;
- int i;
int first = 1;
/* If stack of files hasn't changed since we last printed
@@ -67,7 +66,7 @@
fprintf (stderr, ",\n ");
}
- fprintf (stderr, " from %s:%d", ip->nominal_fname, line);
+ fprintf (stderr, " from %s:%ld", ip->nominal_fname, line);
}
if (! first)
fprintf (stderr, ":\n");
diff -r -u orig/egcs-980221/gcc/cse.c egcs-980221/gcc/cse.c
--- orig/egcs-980221/gcc/cse.c Thu Feb 12 09:26:47 1998
+++ egcs-980221/gcc/cse.c Mon Feb 23 15:20:59 1998
@@ -7803,13 +7803,15 @@
if (last_jump_equiv_class)
for (p = last_jump_equiv_class->first_same_value; p;
p = p->next_same_value)
- if (GET_CODE (p->exp) == MEM || GET_CODE (p->exp) == REG
- || (GET_CODE (p->exp) == SUBREG
- && GET_CODE (SUBREG_REG (p->exp)) == REG))
- invalidate (p->exp, VOIDmode);
- else if (GET_CODE (p->exp) == STRICT_LOW_PART
- || GET_CODE (p->exp) == ZERO_EXTRACT)
- invalidate (XEXP (p->exp, 0), GET_MODE (p->exp));
+ {
+ if (GET_CODE (p->exp) == MEM || GET_CODE (p->exp) == REG
+ || (GET_CODE (p->exp) == SUBREG
+ && GET_CODE (SUBREG_REG (p->exp)) == REG))
+ invalidate (p->exp, VOIDmode);
+ else if (GET_CODE (p->exp) == STRICT_LOW_PART
+ || GET_CODE (p->exp) == ZERO_EXTRACT)
+ invalidate (XEXP (p->exp, 0), GET_MODE (p->exp));
+ }
/* Process insns starting after LOOP_START until we hit a CALL_INSN or
a CODE_LABEL (we could handle a CALL_INSN, but it isn't worth it).
@@ -8752,7 +8754,9 @@
{
int *counts = (int *) alloca (nreg * sizeof (int));
rtx insn, prev;
+#ifdef HAVE_cc0
rtx tem;
+#endif
int i;
int in_libcall = 0, dead_libcall = 0;
diff -r -u orig/egcs-980221/gcc/expr.c egcs-980221/gcc/expr.c
--- orig/egcs-980221/gcc/expr.c Thu Feb 12 09:59:57 1998
+++ egcs-980221/gcc/expr.c Mon Feb 23 15:53:22 1998
@@ -5887,9 +5887,9 @@
/* If domain is empty, answer is no. Likewise if index is constant
and out of bounds. */
- if ((TREE_CODE (set_high_bound) == INTEGER_CST
+ if (((TREE_CODE (set_high_bound) == INTEGER_CST
&& TREE_CODE (set_low_bound) == INTEGER_CST
- && tree_int_cst_lt (set_high_bound, set_low_bound)
+ && tree_int_cst_lt (set_high_bound, set_low_bound))
|| (TREE_CODE (index) == INTEGER_CST
&& TREE_CODE (set_low_bound) == INTEGER_CST
&& tree_int_cst_lt (index, set_low_bound))
diff -r -u orig/egcs-980221/gcc/final.c egcs-980221/gcc/final.c
--- orig/egcs-980221/gcc/final.c Thu Feb 5 20:18:05 1998
+++ egcs-980221/gcc/final.c Mon Feb 23 18:10:14 1998
@@ -583,7 +583,7 @@
{
if (! app_on)
{
- fprintf (asm_out_file, ASM_APP_ON);
+ fputs (ASM_APP_ON, asm_out_file);
app_on = 1;
}
}
@@ -596,7 +596,7 @@
{
if (app_on)
{
- fprintf (asm_out_file, ASM_APP_OFF);
+ fputs (ASM_APP_OFF, asm_out_file);
app_on = 0;
}
}
@@ -1099,7 +1099,9 @@
#else
#if defined(STRUCT_VALUE_REGNUM) && defined(ASM_OUTPUT_REG_PUSH)
if (sval)
- ASM_OUTPUT_REG_PUSH (file, STRUCT_VALUE_REGNUM);
+ {
+ ASM_OUTPUT_REG_PUSH (file, STRUCT_VALUE_REGNUM);
+ }
#endif
#endif
@@ -1109,7 +1111,9 @@
#else
#if defined(STATIC_CHAIN_REGNUM) && defined(ASM_OUTPUT_REG_PUSH)
if (cxt)
- ASM_OUTPUT_REG_PUSH (file, STATIC_CHAIN_REGNUM);
+ {
+ ASM_OUTPUT_REG_PUSH (file, STATIC_CHAIN_REGNUM);
+ }
#endif
#endif
@@ -1121,7 +1125,9 @@
#else
#if defined(STATIC_CHAIN_REGNUM) && defined(ASM_OUTPUT_REG_PUSH)
if (cxt)
- ASM_OUTPUT_REG_POP (file, STATIC_CHAIN_REGNUM);
+ {
+ ASM_OUTPUT_REG_POP (file, STATIC_CHAIN_REGNUM);
+ }
#endif
#endif
@@ -1131,7 +1137,9 @@
#else
#if defined(STRUCT_VALUE_REGNUM) && defined(ASM_OUTPUT_REG_PUSH)
if (sval)
- ASM_OUTPUT_REG_POP (file, STRUCT_VALUE_REGNUM);
+ {
+ ASM_OUTPUT_REG_POP (file, STRUCT_VALUE_REGNUM);
+ }
#endif
#endif
}
@@ -1148,7 +1156,7 @@
{
if (app_on)
{
- fprintf (file, ASM_APP_OFF);
+ fputs (ASM_APP_OFF, file);
app_on = 0;
}
@@ -1476,7 +1484,7 @@
break; /* An insn that was "deleted" */
if (app_on)
{
- fprintf (file, ASM_APP_OFF);
+ fputs (ASM_APP_OFF, file);
app_on = 0;
}
if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_BEG
@@ -1660,7 +1668,7 @@
#endif
if (app_on)
{
- fprintf (file, ASM_APP_OFF);
+ fputs (ASM_APP_OFF, file);
app_on = 0;
}
if (NEXT_INSN (insn) != 0
@@ -1700,7 +1708,7 @@
default:
{
- register rtx body = PATTERN (insn), set;
+ register rtx body = PATTERN (insn);
int insn_code_number;
char *template;
#ifdef HAVE_cc0
@@ -1740,7 +1748,7 @@
if (app_on)
{
- fprintf (file, ASM_APP_OFF);
+ fputs (ASM_APP_OFF, file);
app_on = 0;
}
@@ -1792,7 +1800,7 @@
break;
if (! app_on)
{
- fprintf (file, ASM_APP_ON);
+ fputs (ASM_APP_ON, file);
app_on = 1;
}
fprintf (asm_out_file, "\t%s\n", XSTR (body, 0));
@@ -1813,7 +1821,7 @@
if (! app_on)
{
- fprintf (file, ASM_APP_ON);
+ fputs (ASM_APP_ON, file);
app_on = 1;
}
@@ -1832,7 +1840,7 @@
if (prescan <= 0 && app_on)
{
- fprintf (file, ASM_APP_OFF);
+ fputs (ASM_APP_OFF, file);
app_on = 0;
}
diff -r -u orig/egcs-980221/gcc/function.c egcs-980221/gcc/function.c
--- orig/egcs-980221/gcc/function.c Fri Feb 13 20:13:44 1998
+++ egcs-980221/gcc/function.c Mon Feb 23 15:46:22 1998
@@ -40,6 +40,9 @@
#include "config.h"
#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#include "rtl.h"
#include "tree.h"
#include "flags.h"
@@ -415,8 +418,10 @@
static int instantiate_virtual_regs_1 PROTO((rtx *, rtx, int));
static void delete_handlers PROTO((void));
static void pad_to_arg_alignment PROTO((struct args_size *, int));
+#ifndef ARGS_GROW_DOWNWARD
static void pad_below PROTO((struct args_size *, enum machine_mode,
tree));
+#endif
static tree round_down PROTO((tree, int));
static rtx round_trampoline_addr PROTO((rtx));
static tree blocks_nreverse PROTO((tree));
@@ -4607,6 +4612,7 @@
}
}
+#ifndef ARGS_GROW_DOWNWARD
static void
pad_below (offset_ptr, passed_mode, sizetree)
struct args_size *offset_ptr;
@@ -4634,6 +4640,7 @@
}
}
}
+#endif
static tree
round_down (value, divisor)
@@ -6021,7 +6028,7 @@
move it to just after the last prologue insn. */
if (note == 0)
{
- for (note = insn; note = NEXT_INSN (note);)
+ for (note = insn; (note = NEXT_INSN (note));)
if (GET_CODE (note) == NOTE
&& NOTE_LINE_NUMBER (note) == NOTE_INSN_PROLOGUE_END)
break;
@@ -6059,7 +6066,7 @@
move it to just before the first epilogue insn. */
if (note == 0)
{
- for (note = insn; note = PREV_INSN (note);)
+ for (note = insn; (note = PREV_INSN (note));)
if (GET_CODE (note) == NOTE
&& NOTE_LINE_NUMBER (note) == NOTE_INSN_EPILOGUE_BEG)
break;
diff -r -u orig/egcs-980221/gcc/integrate.c egcs-980221/gcc/integrate.c
--- orig/egcs-980221/gcc/integrate.c Sat Feb 7 17:54:32 1998
+++ egcs-980221/gcc/integrate.c Mon Feb 23 17:21:18 1998
@@ -1295,7 +1295,9 @@
rtx stack_save = 0;
rtx temp;
struct inline_remap *map;
+#ifdef HAVE_cc0
rtx cc0_insn = 0;
+#endif
rtvec arg_vector = ORIGINAL_ARG_VECTOR (header);
rtx static_chain_value = 0;
diff -r -u orig/egcs-980221/gcc/jump.c egcs-980221/gcc/jump.c
--- orig/egcs-980221/gcc/jump.c Tue Feb 3 16:19:59 1998
+++ egcs-980221/gcc/jump.c Mon Feb 23 17:24:19 1998
@@ -800,7 +800,10 @@
or a jump to somewhere else. */
rtx target = JUMP_LABEL (temp);
int nuses = LABEL_NUSES (target);
- rtx p, q;
+ rtx p;
+#ifdef HAVE_cc0
+ rtx q;
+#endif
/* Set P to the first jump insn that goes around "x = a;". */
for (p = temp; nuses && p; p = prev_nonnote_insn (p))
@@ -2542,7 +2545,6 @@
rtx last1 = 0, last2 = 0;
rtx afterlast1 = 0, afterlast2 = 0;
- rtx prev1;
*f1 = 0;
*f2 = 0;
diff -r -u orig/egcs-980221/gcc/libgcc2.c egcs-980221/gcc/libgcc2.c
--- orig/egcs-980221/gcc/libgcc2.c Fri Feb 13 00:40:25 1998
+++ egcs-980221/gcc/libgcc2.c Mon Feb 23 17:03:47 1998
@@ -1910,7 +1910,7 @@
{
for (ptr = bb_head; ptr != (struct bb *) 0; ptr = ptr->next)
{
- if (!ptr->filename || p->filename != (char *) 0 && strcmp (p->filename, ptr->filename))
+ if (!ptr->filename || (p->filename != (char *) 0 && strcmp (p->filename, ptr->filename)))
continue;
for (blk = 0; blk < ptr->ncounts; blk++)
{
@@ -2011,7 +2011,7 @@
for ( ; bucket; bucket = bucket->next )
{
fprintf (file, "Jump from block 0x%.*lx to "
- "block 0x%.*lx executed %*d time(s)\n",
+ "block 0x%.*lx executed %*lu time(s)\n",
addr_len, bucket->src_addr,
addr_len, bucket->dst_addr,
cnt_len, bucket->count);
@@ -2111,7 +2111,7 @@
{
unsigned long l;
f->next = bb_func_head;
- if (pos = strchr (p, ':'))
+ if ((pos = strchr (p, ':')))
{
if (!(f->funcname = (char *) malloc (strlen (pos+1)+1)))
continue;
diff -r -u orig/egcs-980221/gcc/local-alloc.c egcs-980221/gcc/local-alloc.c
--- orig/egcs-980221/gcc/local-alloc.c Thu Feb 5 11:33:59 1998
+++ egcs-980221/gcc/local-alloc.c Mon Feb 23 16:25:40 1998
@@ -61,6 +61,9 @@
#include "config.h"
#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#include "rtl.h"
#include "flags.h"
#include "basic-block.h"
@@ -2181,7 +2184,7 @@
int reg_allowed = 0;
int num_matching_alts = 0;
- while (c = *p++)
+ while ((c = *p++))
switch (c)
{
case '=': case '+': case '?':
diff -r -u orig/egcs-980221/gcc/loop.c egcs-980221/gcc/loop.c
--- orig/egcs-980221/gcc/loop.c Wed Feb 18 18:47:59 1998
+++ egcs-980221/gcc/loop.c Mon Feb 23 16:24:01 1998
@@ -324,11 +324,13 @@
/* Two main functions for implementing bct:
first - to be called before loop unrolling, and the second - after */
+#ifdef HAVE_decrement_and_branch_on_count
static void analyze_loop_iterations ();
static void insert_bct ();
/* Auxiliary function that inserts the bct pattern into the loop */
static void instrument_loop_bct ();
+#endif /* HAVE_decrement_and_branch_on_count */
#endif /* HAIFA */
/* Indirect_jump_in_function is computed once per function. */
@@ -1980,7 +1982,7 @@
/* If library call, now fix the REG_NOTES that contain
insn pointers, namely REG_LIBCALL on FIRST
and REG_RETVAL on I1. */
- if (temp = find_reg_note (i1, REG_RETVAL, NULL_RTX))
+ if ((temp = find_reg_note (i1, REG_RETVAL, NULL_RTX)))
{
XEXP (temp, 0) = first;
temp = find_reg_note (first, REG_LIBCALL, NULL_RTX);
@@ -2046,8 +2048,8 @@
/* if library call, delete all insn except last, which
is deleted below */
- if (temp = find_reg_note (m1->insn, REG_RETVAL,
- NULL_RTX))
+ if ((temp = find_reg_note (m1->insn, REG_RETVAL,
+ NULL_RTX)))
{
for (temp = XEXP (temp, 0); temp != m1->insn;
temp = NEXT_INSN (temp))
@@ -3018,7 +3020,7 @@
this = invariant_p (SET_SRC (set));
if (this != 0)
value |= this;
- else if (temp = find_reg_note (p, REG_EQUAL, NULL_RTX))
+ else if ((temp = find_reg_note (p, REG_EQUAL, NULL_RTX)))
{
/* If this is a libcall, then any invariant REG_EQUAL note is OK.
If this is an ordinary insn, then only CONSTANT_P REG_EQUAL
@@ -6440,7 +6442,10 @@
rtx reg = bl->biv->dest_reg;
enum machine_mode mode = GET_MODE (reg);
struct induction *v;
- rtx arg, new, tem;
+ rtx arg, tem;
+#ifdef HAVE_cc0
+ rtx new;
+#endif
int arg_operand;
char *fmt;
int i, j;
@@ -7164,6 +7169,7 @@
loop_increment[loop_num]
loop_comparison_code[loop_num] */
+#ifdef HAVE_decrement_and_branch_on_count
static
void analyze_loop_iterations (loop_start, loop_end)
rtx loop_start, loop_end;
@@ -7641,7 +7647,6 @@
rtx sequence;
enum machine_mode loop_var_mode = SImode;
-#ifdef HAVE_decrement_and_branch_on_count
if (HAVE_decrement_and_branch_on_count)
{
if (loop_dump_stream)
@@ -7679,8 +7684,9 @@
LABEL_NUSES (start_label)++;
}
-#endif /* HAVE_decrement_and_branch_on_count */
}
+#endif /* HAVE_decrement_and_branch_on_count */
+
#endif /* HAIFA */
/* Scan the function and determine whether it has indirect (computed) jumps.
diff -r -u orig/egcs-980221/gcc/objc/objc-act.c egcs-980221/gcc/objc/objc-act.c
--- orig/egcs-980221/gcc/objc/objc-act.c Mon Dec 22 04:31:41 1997
+++ egcs-980221/gcc/objc/objc-act.c Mon Feb 23 15:07:31 1998
@@ -40,6 +40,9 @@
#include "config.h"
#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#include "tree.h"
#include "c-tree.h"
#include "c-lex.h"
@@ -748,7 +751,9 @@
sel_name, class_meth);
}
else
- ; /* An identifier...if we could not find a protocol. */
+ {
+ ; /* An identifier...if we could not find a protocol. */
+ }
if (fnd)
return fnd;
@@ -786,7 +791,9 @@
}
}
else
- ; /* An identifier...if we could not find a protocol. */
+ {
+ ; /* An identifier...if we could not find a protocol. */
+ }
return 0;
}
@@ -1349,7 +1356,7 @@
tree constructor, class_decl;
{
static int num_static_inst;
- tree *chain, decl, decl_spec, decl_expr;
+ tree *chain, decl;
char buf[256];
push_obstacks_nochange ();
@@ -1805,7 +1812,7 @@
tree ident;
enum string_section section;
{
- tree chain, decl;
+ tree chain;
if (section == class_names)
chain = class_names_chain;
@@ -1829,7 +1836,7 @@
generate_static_references ()
{
tree decls = NULL_TREE, ident, decl_spec, expr_decl, expr = NULL_TREE;
- tree class_name, class, decl, instance, idecl, initlist;
+ tree class_name, class, decl, initlist;
tree cl_chain, in_chain, type;
int num_inst, num_class;
char buf[256];
@@ -6028,7 +6035,9 @@
}
else
- ; /* An identifier if we could not find a protocol. */
+ {
+ ; /* An identifier if we could not find a protocol. */
+ }
/* Check protocols recursively. */
if (PROTOCOL_LIST (p))
diff -r -u orig/egcs-980221/gcc/protoize.c egcs-980221/gcc/protoize.c
--- orig/egcs-980221/gcc/protoize.c Sat Dec 6 19:29:01 1997
+++ egcs-980221/gcc/protoize.c Mon Feb 23 16:42:08 1998
@@ -85,6 +85,10 @@
#include <stdlib.h>
#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#ifdef HAVE_STRING_H
#include <string.h>
#else
@@ -786,7 +790,7 @@
const char *p2;
int c;
- for (p1 = s1, p2 = s2; c = *p2; p1++, p2++)
+ for (p1 = s1, p2 = s2; (c = *p2); p1++, p2++)
if (*p1 != c)
goto outer;
return s1;
@@ -1336,12 +1340,12 @@
if (rel_filename[0] != '/')
{
src_p = cwd2;
- while (*endp++ = *src_p++)
+ while ((*endp++ = *src_p++))
continue;
*(endp-1) = '/'; /* overwrite null */
}
src_p = rel_filename;
- while (*endp++ = *src_p++)
+ while ((*endp++ = *src_p++))
continue;
}
@@ -1493,7 +1497,7 @@
if (rel_buffer + filename_len <= rel_buf_p)
return filename;
}
- while (*rel_buf_p++ = *path_p++);
+ while ((*rel_buf_p++ = *path_p++));
--rel_buf_p;
if (*(rel_buf_p-1) == '/')
diff -r -u orig/egcs-980221/gcc/regmove.c egcs-980221/gcc/regmove.c
--- orig/egcs-980221/gcc/regmove.c Sun Feb 8 06:43:54 1998
+++ egcs-980221/gcc/regmove.c Mon Feb 23 15:54:18 1998
@@ -1589,7 +1589,7 @@
rtx q, inc_dest;
inc_dest = post_inc_set ? SET_DEST (post_inc_set) : src;
- for (q = post_inc; q = NEXT_INSN (q); )
+ for (q = post_inc; (q = NEXT_INSN (q)); )
{
if (GET_CODE (q) == CODE_LABEL || GET_CODE (q) == JUMP_INSN
|| (GET_CODE (q) == NOTE
diff -r -u orig/egcs-980221/gcc/reload.c egcs-980221/gcc/reload.c
--- orig/egcs-980221/gcc/reload.c Fri Feb 13 20:13:47 1998
+++ egcs-980221/gcc/reload.c Mon Feb 23 16:27:39 1998
@@ -366,7 +366,6 @@
enum machine_mode t_mode = VOIDmode;
enum insn_code t_icode = CODE_FOR_nothing;
enum reload_type secondary_type;
- int i;
int s_reload, t_reload = -1;
if (type == RELOAD_FOR_INPUT_ADDRESS
@@ -2460,7 +2459,7 @@
/* Scan this operand's constraint to see if it is an output operand,
an in-out operand, is commutative, or should match another. */
- while (c = *p++)
+ while ((c = *p++))
{
if (c == '=')
modified[i] = RELOAD_WRITE;
diff -r -u orig/egcs-980221/gcc/reload1.c egcs-980221/gcc/reload1.c
--- orig/egcs-980221/gcc/reload1.c Fri Feb 13 20:13:48 1998
+++ egcs-980221/gcc/reload1.c Mon Feb 23 17:32:00 1998
@@ -21,6 +21,9 @@
#include "config.h"
#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#include "rtl.h"
#include "obstack.h"
#include "insn-config.h"
diff -r -u orig/egcs-980221/gcc/rtl.h egcs-980221/gcc/rtl.h
--- orig/egcs-980221/gcc/rtl.h Tue Feb 17 05:26:42 1998
+++ egcs-980221/gcc/rtl.h Mon Feb 23 14:12:15 1998
@@ -1206,7 +1206,7 @@
extern int constrain_operands PROTO ((int, int));
extern int mode_dependent_address_p PROTO ((rtx));
extern void init_recog_no_volatile PROTO ((void));
-extern int offsettable_memref_pq PROTO ((rtx));
+extern int offsettable_memref_p PROTO ((rtx));
extern int offsettable_nonstrict_memref_p PROTO ((rtx));
extern int reg_fits_class_p PROTO ((rtx, register enum reg_class,
int, enum machine_mode));
diff -r -u orig/egcs-980221/gcc/stmt.c egcs-980221/gcc/stmt.c
--- orig/egcs-980221/gcc/stmt.c Tue Feb 17 08:21:01 1998
+++ egcs-980221/gcc/stmt.c Mon Feb 23 15:49:18 1998
@@ -4073,7 +4073,7 @@
if (r->balance < 0)
{
/* R-Rotation */
- if (p->left = s = r->right)
+ if ((p->left = s = r->right))
s->parent = p;
r->right = p;
@@ -4082,7 +4082,7 @@
s = p->parent;
p->parent = r;
- if (r->parent = s)
+ if ((r->parent = s))
{
if (s->left == p)
s->left = r;
@@ -4100,11 +4100,11 @@
int b2;
struct case_node *t = r->right;
- if (p->left = s = t->right)
+ if ((p->left = s = t->right))
s->parent = p;
t->right = p;
- if (r->right = s = t->left)
+ if ((r->right = s = t->left))
s->parent = r;
t->left = r;
@@ -4118,7 +4118,7 @@
p->parent = t;
r->parent = t;
- if (t->parent = s)
+ if ((t->parent = s))
{
if (s->left == p)
s->left = t;
@@ -4152,7 +4152,7 @@
{
/* L-Rotation */
- if (p->right = s = r->left)
+ if ((p->right = s = r->left))
s->parent = p;
r->left = p;
@@ -4160,7 +4160,7 @@
r->balance = 0;
s = p->parent;
p->parent = r;
- if (r->parent = s)
+ if ((r->parent = s))
{
if (s->left == p)
s->left = r;
@@ -4179,12 +4179,12 @@
int b2;
struct case_node *t = r->left;
- if (p->right = s = t->left)
+ if ((p->right = s = t->left))
s->parent = p;
t->left = p;
- if (r->left = s = t->right)
+ if ((r->left = s = t->right))
s->parent = r;
t->right = r;
@@ -4198,7 +4198,7 @@
p->parent = t;
r->parent = t;
- if (t->parent = s)
+ if ((t->parent = s))
{
if (s->left == p)
s->left = t;
@@ -4981,7 +4981,7 @@
right = case_tree2list (node->right, right);
node->right = right;
- if (left = node->left)
+ if ((left = node->left))
{
node->left = 0;
return case_tree2list (left, node);
diff -r -u orig/egcs-980221/gcc/tree.c egcs-980221/gcc/tree.c
--- orig/egcs-980221/gcc/tree.c Wed Feb 18 05:38:49 1998
+++ egcs-980221/gcc/tree.c Mon Feb 23 16:56:23 1998
@@ -3309,8 +3309,12 @@
tree type;
{
int valid = 0;
+#ifdef VALID_MACHINE_DECL_ATTRIBUTE
tree decl_attr_list = decl != 0 ? DECL_MACHINE_ATTRIBUTES (decl) : 0;
+#endif
+#ifdef VALID_MACHINE_TYPE_ATTRIBUTE
tree type_attr_list = TYPE_ATTRIBUTES (type);
+#endif
if (TREE_CODE (attr_name) != IDENTIFIER_NODE)
abort ();
@@ -3480,6 +3484,7 @@
/* One that completely contains the other? Take it. */
else if (a2 && ! attribute_list_contained (a1, a2))
+ {
if (attribute_list_contained (a2, a1))
attributes = a2;
else
@@ -3499,6 +3504,7 @@
attributes = a1;
}
}
+ }
return attributes;
}
diff -r -u orig/egcs-980221/gcc/unroll.c egcs-980221/gcc/unroll.c
--- orig/egcs-980221/gcc/unroll.c Fri Feb 13 20:13:50 1998
+++ egcs-980221/gcc/unroll.c Mon Feb 23 17:26:16 1998
@@ -1631,7 +1631,9 @@
rtx insn, pattern;
rtx tem, copy;
int dest_reg_was_split, i;
+#ifdef HAVE_cc0
rtx cc0_insn = 0;
+#endif
rtx final_label = 0;
rtx giv_inc, giv_dest_reg, giv_src_reg;
diff -r -u orig/egcs-980221/gcc/varasm.c egcs-980221/gcc/varasm.c
--- orig/egcs-980221/gcc/varasm.c Wed Feb 18 17:19:00 1998
+++ egcs-980221/gcc/varasm.c Mon Feb 23 17:18:22 1998
@@ -28,6 +28,9 @@
#include "config.h"
#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#include <setjmp.h>
/* #include <stab.h> */
#include "rtl.h"
--
Kaveh R. Ghazi Project Manager / Custom Development
ghazi@caip.rutgers.edu ICon CMT Corp.
More information about the Gcc
mailing list