aboutsummaryrefslogtreecommitdiff
path: root/gcc/final.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1998-02-28 07:06:53 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1998-02-28 07:06:53 +0000
commit517237119124e0a16546a3bf0584d9422ca5dfb0 (patch)
tree6685fdcda742726b5edb9dbde23a6e7176b93726 /gcc/final.c
parentc580105315d6e393e042182ced090b8ec6ce0b51 (diff)
downloadgcc-517237119124e0a16546a3bf0584d9422ca5dfb0.zip
gcc-517237119124e0a16546a3bf0584d9422ca5dfb0.tar.gz
gcc-517237119124e0a16546a3bf0584d9422ca5dfb0.tar.bz2
Fix warious warnings:
* 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. * 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. From-SVN: r18290
Diffstat (limited to 'gcc/final.c')
-rw-r--r--gcc/final.c38
1 files changed, 23 insertions, 15 deletions
diff --git a/gcc/final.c b/gcc/final.c
index cf131c5..f6bd7b2 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -1,5 +1,5 @@
/* Convert RTL to assembler code and output it, for GNU compiler.
- Copyright (C) 1987, 88, 89, 92-6, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 89, 92-7, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -583,7 +583,7 @@ app_enable ()
{
if (! app_on)
{
- fprintf (asm_out_file, ASM_APP_ON);
+ fputs (ASM_APP_ON, asm_out_file);
app_on = 1;
}
}
@@ -596,7 +596,7 @@ app_disable ()
{
if (app_on)
{
- fprintf (asm_out_file, ASM_APP_OFF);
+ fputs (ASM_APP_OFF, asm_out_file);
app_on = 0;
}
}
@@ -1099,7 +1099,9 @@ profile_function (file)
#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 @@ profile_function (file)
#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 @@ profile_function (file)
#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 @@ profile_function (file)
#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 @@ final_end_function (first, file, optimize)
{
if (app_on)
{
- fprintf (file, ASM_APP_OFF);
+ fputs (ASM_APP_OFF, file);
app_on = 0;
}
@@ -1476,7 +1484,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
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 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
#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 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
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 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
if (app_on)
{
- fprintf (file, ASM_APP_OFF);
+ fputs (ASM_APP_OFF, file);
app_on = 0;
}
@@ -1792,7 +1800,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
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 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
if (! app_on)
{
- fprintf (file, ASM_APP_ON);
+ fputs (ASM_APP_ON, file);
app_on = 1;
}
@@ -1832,7 +1840,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
if (prescan <= 0 && app_on)
{
- fprintf (file, ASM_APP_OFF);
+ fputs (ASM_APP_OFF, file);
app_on = 0;
}