From 07e64d6e40b10d508e45b8f6e78f7bfb057cda44 Mon Sep 17 00:00:00 2001 From: law Date: Tue, 27 Jan 1998 22:11:55 +0000 Subject: d * c-lex.c: Include and /. Add prototype for `handle_sysv_pragma', and make it static. Add parentheses around assignment used as truth value. * combine.c (combine_instructions): Protect variable `prev' with macro HAVE_cc0. (can_combine_p): Protect variable `link' with AUTO_INC_DEC. (extract_left_shift): Add parentheses around operand of &. (merge_outer_ops): Avoid an empty body in an else-statement. (gen_rtx_combine): Remove unused variable `i'. * sparc/gmon-sol2.c: Include . Make return type of function monstartup `void'. Likewise for internal_mcount. Add `static void' prototype for moncontrol. Reconcile sprintf format vs. args. * sparc/sparc.c: Include and /. Make return type of function_arg_slotno explicitly `int'. (reg_unused_after): Add parentheses around assignment used as truth value. (save_regs): Add explicit braces to avoid ambiguous `else'. (function_arg_slotno): Add parentheses around && within ||. (function_arg_pass_by_reference): Likewise. (sparc_flat_output_function_prologue): Reconcile fprintf format vs. args. * svr4.h (ASM_OUTPUT_LIMITED_STRING): Add parentheses around assignment used as truth value. * cplus-dem.c: Include . (demangle_signature): Avoid an empty body in an else-statement. (do_type): Remove unused variable `lvl'. * cppexp.c: Don't have depend on MULTIBYTE_CHARS. Include /. (cpp_lex): Remove unused variable `namelen'. (cpp_lex): Explicitly declare `num_chars' as an int. * cpplib.c: Avoid duplicate inclusion of , include instead. Explicitly declare is_system_include returning int. (make_assertion): Remove unused variable `kt'. (cpp_expand_to_buffer): Hide variable `obuf'. (output_line_command): Remove unused variables, `line_end', `line_cmd_buf' and `len'. (macarg): Remove unused variable `arg_start'. (special_symbol): Remove unused variable `i'. Add parentheses around assignment used as truth value. (do_include): Remove unused variables `pcfname' and `retried', hide `pcf' and `pcfbuflimit'. (do_line): Remove unused variable `i'. (finclude): Hide variable `missing_newline'. (cpp_handle_options): Remove unused variable `j'. (read_token_list): Remove unused variable `eofp'. (cpp_error_with_line): Remove unused variable `i'. (cpp_warning_with_line): Likewise. (cpp_pedwarn_with_line): Explicitly declare `column' as int. (cpp_error_from_errno): Remove unused variable `i'. * cse.c (invalidate): Add parentheses around assignment used as truth value. (find_best_addr): Move declaration of variable `our_cost' inside the conditional macro where its used. (fold_rtx): Avoid an empty body in an if-statement. (cse_insn): Wrap variables `this_insn_cc0_mode' and `this_insn_cc0' in macro HAVE_cc0. * dwarf2out.c: Include and /. (ASM_OUTPUT_DWARF_DATA8): Reconcile format vs. args in fprintf's. (output_uleb128): Likewise. (output_sleb128): Likewise. (output_cfi): Likewise. (output_call_frame_info): Remove unused variables `j', `fde_size' and `fde_pad'. (comp_unit_has_inlines): Hide declaration as per rest of file. (size_of_line_prolog): Correct typo in prototype. (add_arange): Likewise. (output_aranges): Likewise. (add_name_and_src_coords_attributes): Likewise. (gen_array_type_die): Likewise. (gen_inlined_subroutine_die): Likewise. (equate_decl_number_to_die): Remove unused variable `i'. (print_die): Reconcile format vs. args in fprintf's. (print_dwarf_line_table): Likewise. (output_die): Likewise. (output_line_info): Likewise. (add_subscript_info): Avoid an empty body in an else-statement. (gen_subprogram_die): Remove unused variable `fp_loc'. * dwarfout.c: Explicitly declare `next_pubname_number' as int. Protect `ordering_attribute' prototype with USE_ORDERING_ATTRIBUTE macro. Protect `src_coords_attribute' prototype with DWARF_DECL_COORDINATES macro. Hide `output_entry_point_die' prototype as in the rest of the file. Likewise for `output_pointer_type_die' and `output_reference_type_die'. Remove prototype for `type_of_for_scope'. (output_unsigned_leb128): Reconcile format vs. args in fprintf. (type_attribute): Add explicit braces to avoid ambiguous `else'. * final.c: Include and /. (shorten_branches): Protect declaration of tmp_length with SHORTEN_WITH_ADJUST_INSN_LENGTH and ADJUST_INSN_LENGTH macros. (profile_function): Protect declaration of `sval' and `cxt' variables with appropriate macros. (final_scan_insn): Likewise for `note' variable. Add explicit braces to avoid empty body in an if-statement. (output_asm_insn): Move variable `i' inside macro conditional where it is used. Add parentheses around assignment used as truth value. (asm_fprintf) Likewise, likewise. * fix-header.c (main): Remove unused variable `done'. Protect declaration of `i' with FIXPROTO_IGNORE_LIST. * pexecute.c: Include . Prototype `my_strerror'. * print-rtl.c (print_inline_rtx): Explicitly declare the parameter `ind'. * profile.c: Include /. (instrument_arcs): Remove unused variables `note', `inverted', `zero' and `neg_one'. (branch_prob): Avoid empty body in an if-statement. * regclass.c: Include . (reg_alternate_class): Explicitly declare parameter `regno'. * regmove.c (regmove_optimize): Remove unused variable `p'. Add parentheses around assignment used as truth value. (find_matches): Remove unused variables `output_operand' and `matching_operand'. (fixup_match_1): Remove statement with no effect: "if (0) ;". * scan.c (sstring_append): Explicitly declare `count' as int. (scan_string): Explicitly declare parameter `init' as int. * sched.c: Include . (BLOCKAGE_RANGE): Add parentheses around arithmetic in operand of |. (rank_for_schedule): Add parentheses around assignment used as truth value. (schedule_block): Likewise. (regno_use_in): Likewise. (schedule_insns): Remove unused variable `i'. * toplev.c: Include and /. (v_message_with_decl): Remove unused variable `n'. (botch): Explicitly declare parameter `s' as char *. (main): Add parentheses around assignment used as truth value. * tree.c (make_node): Protect the variable `kind' with the GATHER_STATISTICS macro. (real_value_from_int_cst): Move variable `e' inside conditional macro area where it is used. (tree_last): Add parentheses around assignment used as truth value. (build1): Protect the variable `kind' with the GATHER_STATISTICS macro. (print_obstack_statistics): Reconcile format vs. args in fprintf. Protect variables `i', `total_nodes', and `total_bytes' with the GATHER_STATISTICS macro. Lots more -W -Wall warnings disappear. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17518 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/dwarfout.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'gcc/dwarfout.c') diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c index 406fb89f4cd..c9fb09e9598 100644 --- a/gcc/dwarfout.c +++ b/gcc/dwarfout.c @@ -248,7 +248,7 @@ static unsigned current_dienum; represents a function or data object defined in this compilation unit which has "extern" linkage. */ -static next_pubname_number = 0; +static int next_pubname_number = 0; #define NEXT_DIE_NUM pending_sibling_stack[pending_siblings-1] @@ -369,7 +369,9 @@ static inline void fund_type_attribute PROTO((unsigned)); static void mod_fund_type_attribute PROTO((tree, int, int)); static inline void user_def_type_attribute PROTO((tree)); static void mod_u_d_type_attribute PROTO((tree, int, int)); +#ifdef USE_ORDERING_ATTRIBUTE static inline void ordering_attribute PROTO((unsigned)); +#endif /* defined(USE_ORDERING_ATTRIBUTE) */ static void subscript_data_attribute PROTO((tree)); static void byte_size_attribute PROTO((tree)); static inline void bit_offset_attribute PROTO((tree)); @@ -392,7 +394,9 @@ static inline void producer_attribute PROTO((char *)); static inline void inline_attribute PROTO((tree)); static inline void containing_type_attribute PROTO((tree)); static inline void abstract_origin_attribute PROTO((tree)); +#ifdef DWARF_DECL_COORDINATES static inline void src_coords_attribute PROTO((unsigned, unsigned)); +#endif /* defined(DWARF_DECL_COORDINATES) */ static inline void pure_or_virtual_attribute PROTO((tree)); static void name_and_src_coords_attributes PROTO((tree)); static void type_attribute PROTO((tree, int, int)); @@ -403,7 +407,9 @@ static inline tree member_declared_type PROTO((tree)); static char *function_start_label PROTO((tree)); static void output_array_type_die PROTO((void *)); static void output_set_type_die PROTO((void *)); +#if 0 static void output_entry_point_die PROTO((void *)); +#endif static void output_inlined_enumeration_type_die PROTO((void *)); static void output_inlined_structure_type_die PROTO((void *)); static void output_inlined_union_type_die PROTO((void *)); @@ -416,8 +422,10 @@ static void output_lexical_block_die PROTO((void *)); static void output_inlined_subroutine_die PROTO((void *)); static void output_local_variable_die PROTO((void *)); static void output_member_die PROTO((void *)); +#if 0 static void output_pointer_type_die PROTO((void *)); static void output_reference_type_die PROTO((void *)); +#endif static void output_ptr_to_mbr_type_die PROTO((void *)); static void output_compile_unit_die PROTO((void *)); static void output_string_type_die PROTO((void *)); @@ -432,7 +440,6 @@ static void output_die PROTO((void (*) (), void *)); static void end_sibling_chain PROTO((void)); static void output_formal_types PROTO((tree)); static void pend_type PROTO((tree)); -static inline int type_of_for_scope PROTO((tree, tree)); static void output_pending_types_for_scope PROTO((tree)); static void output_type PROTO((tree, tree)); static void output_tagged_type_instantiation PROTO((tree)); @@ -1243,7 +1250,7 @@ output_unsigned_leb128 (value) byte |= 0x80; fprintf (asm_out_file, "\t%s\t0x%x", ASM_BYTE_OP, (unsigned) byte); if (flag_debug_asm && value == 0) - fprintf (asm_out_file, "\t%s ULEB128 number - value = %u", + fprintf (asm_out_file, "\t%s ULEB128 number - value = %lu", ASM_COMMENT_START, orig_value); fputc ('\n', asm_out_file); } @@ -1275,7 +1282,7 @@ output_signed_leb128 (value) } fprintf (asm_out_file, "\t%s\t0x%x", ASM_BYTE_OP, (unsigned) byte); if (flag_debug_asm && more == 0) - fprintf (asm_out_file, "\t%s SLEB128 number - value = %d", + fprintf (asm_out_file, "\t%s SLEB128 number - value = %ld", ASM_COMMENT_START, orig_value); fputc ('\n', asm_out_file); } @@ -3104,14 +3111,17 @@ type_attribute (type, decl_const, decl_volatile) || TYPE_READONLY (type) || TYPE_VOLATILE (type)); if (type_is_fundamental (root_type (type))) - if (root_type_modified) + { + if (root_type_modified) mod_fund_type_attribute (type, decl_const, decl_volatile); - else + else fund_type_attribute (fundamental_type_code (type)); + } else - if (root_type_modified) + { + if (root_type_modified) mod_u_d_type_attribute (type, decl_const, decl_volatile); - else + else /* We have to get the type_main_variant here (and pass that to the `user_def_type_attribute' routine) because the ..._TYPE node we have might simply be a *copy* of some original type node (where @@ -3122,6 +3132,7 @@ type_attribute (type, decl_const, decl_volatile) only creates labels for DIEs representing *main variants*, and it never even knows about non-main-variants.) */ user_def_type_attribute (type_main_variant (type)); + } } /* Given a tree pointer to a struct, class, union, or enum type node, return -- cgit v1.2.1