d
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 Jan 1998 22:11:55 +0000 (22:11 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 Jan 1998 22:11:55 +0000 (22:11 +0000)
* c-lex.c: Include <stdlib.h> and <string.h>/<strings.h>.  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 <fcntl.h>.  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 <stdlib.h> and <string.h>/<strings.h>.
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 <stdlib.h>.
(demangle_signature): Avoid an empty body in an else-statement.
(do_type): Remove unused variable `lvl'.
* cppexp.c: Don't have <stdlib.h> depend on MULTIBYTE_CHARS.
Include <string.h>/<strings.h>.
(cpp_lex): Remove unused variable `namelen'.
(cpp_lex): Explicitly declare `num_chars' as an int.
* cpplib.c: Avoid duplicate inclusion of <stdlib.h>, include
<unistd.h> 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 <stdlib.h> and <string.h>/<string.h>.
(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 <stdlib.h> and <string.h>/<strings.h>.
(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 <unistd.h>.  Prototype `my_strerror'.
* print-rtl.c (print_inline_rtx): Explicitly declare the parameter
`ind'.
* profile.c: Include <string.h>/<strings.h>.
(instrument_arcs): Remove unused variables `note', `inverted',
`zero' and `neg_one'.
(branch_prob): Avoid empty body in an if-statement.
* regclass.c: Include <stdlib.h>.
(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 <stdlib.h>.
(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 <stdlib.h> and <string.h>/<strings.h>.
(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/ChangeLog
gcc/config/sparc/sparc.c
gcc/cpplib.c
gcc/dwarfout.c
gcc/regmove.c
gcc/sched.c
gcc/toplev.c
gcc/tree.c

index 404bb0d..35827e0 100644 (file)
@@ -1,3 +1,165 @@
+Tue Jan 27 23:11:11 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * c-lex.c: Include <stdlib.h> and <string.h>/<strings.h>.  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 <fcntl.h>.  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 <stdlib.h> and <string.h>/<strings.h>.
+       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 <stdlib.h>.
+       (demangle_signature): Avoid an empty body in an else-statement.
+       (do_type): Remove unused variable `lvl'.
+       
+       * cppexp.c: Don't have <stdlib.h> depend on MULTIBYTE_CHARS.
+       Include <string.h>/<strings.h>.
+       (cpp_lex): Remove unused variable `namelen'.
+       (cpp_lex): Explicitly declare `num_chars' as an int.
+
+       * cpplib.c: Avoid duplicate inclusion of <stdlib.h>, include
+       <unistd.h> 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 <stdlib.h> and <string.h>/<string.h>.
+       (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 <stdlib.h> and <string.h>/<strings.h>.
+       (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 <unistd.h>.  Prototype `my_strerror'.
+
+       * print-rtl.c (print_inline_rtx): Explicitly declare the parameter
+       `ind'.
+
+       * profile.c: Include <string.h>/<strings.h>.
+       (instrument_arcs): Remove unused variables `note', `inverted',
+       `zero' and `neg_one'.
+       (branch_prob): Avoid empty body in an if-statement.
+
+       * regclass.c: Include <stdlib.h>.
+       (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 <stdlib.h>.
+       (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 <stdlib.h> and <string.h>/<strings.h>.
+       (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.
+
 Tue Jan 27 23:01:55 1998  Mike Stump  (mrs@wrs.com)
 
        * m32r.md, mips.md, mn10200.md, mn10300.md, pyr.md: Add
index 84a8aa7..384609f 100644 (file)
@@ -23,6 +23,16 @@ Boston, MA 02111-1307, USA.  */
 
 #include "config.h"
 #include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
 #include "tree.h"
 #include "rtl.h"
 #include "regs.h"
@@ -107,7 +117,7 @@ static int save_regs                PROTO((FILE *, int, int, char *,
                                       int, int, int));
 static int restore_regs                PROTO((FILE *, int, int, char *, int, int));
 static void build_big_number   PROTO((FILE *, int, char *));
-static function_arg_slotno     PROTO((const CUMULATIVE_ARGS *,
+static int function_arg_slotno PROTO((const CUMULATIVE_ARGS *,
                                       enum machine_mode, tree, int, int,
                                       int *, int *));
 
@@ -1307,7 +1317,7 @@ reg_unused_after (reg, insn)
 {
   enum rtx_code code, prev_code = UNKNOWN;
 
-  while (insn = NEXT_INSN (insn))
+  while ((insn = NEXT_INSN (insn)))
     {
       if (prev_code == CALL_INSN && call_used_regs[REGNO (reg)])
        return 1;
@@ -3135,33 +3145,38 @@ save_regs (file, low, high, base, offset, n_regs, real_offset)
       for (i = low; i < high; i += 2)
        {
          if (regs_ever_live[i] && ! call_used_regs[i])
-           if (regs_ever_live[i+1] && ! call_used_regs[i+1])
-             {
-               fprintf (file, "\tstd %s,[%s+%d]\n",
-                        reg_names[i], base, offset + 4 * n_regs);
-               if (dwarf2out_do_frame ())
-                 {
-                   char *l = dwarf2out_cfi_label ();
-                   dwarf2out_reg_save (l, i, real_offset + 4 * n_regs);
-                   dwarf2out_reg_save (l, i+1, real_offset + 4 * n_regs + 4);
-                 }
-               n_regs += 2;
-             }
-           else
-             {
-               fprintf (file, "\tst %s,[%s+%d]\n",
-                        reg_names[i], base, offset + 4 * n_regs);
-               if (dwarf2out_do_frame ())
-                 dwarf2out_reg_save ("", i, real_offset + 4 * n_regs);
-               n_regs += 2;
-             }
-         else if (regs_ever_live[i+1] && ! call_used_regs[i+1])
            {
-             fprintf (file, "\tst %s,[%s+%d]\n",
-                      reg_names[i+1], base, offset + 4 * n_regs + 4);
-             if (dwarf2out_do_frame ())
-               dwarf2out_reg_save ("", i + 1, real_offset + 4 * n_regs + 4);
-             n_regs += 2;
+             if (regs_ever_live[i+1] && ! call_used_regs[i+1])
+               {
+                 fprintf (file, "\tstd %s,[%s+%d]\n",
+                          reg_names[i], base, offset + 4 * n_regs);
+                 if (dwarf2out_do_frame ())
+                   {
+                     char *l = dwarf2out_cfi_label ();
+                     dwarf2out_reg_save (l, i, real_offset + 4 * n_regs);
+                     dwarf2out_reg_save (l, i+1, real_offset + 4 * n_regs + 4);
+                   }
+                 n_regs += 2;
+               }
+             else
+               {
+                 fprintf (file, "\tst %s,[%s+%d]\n",
+                          reg_names[i], base, offset + 4 * n_regs);
+                 if (dwarf2out_do_frame ())
+                   dwarf2out_reg_save ("", i, real_offset + 4 * n_regs);
+                 n_regs += 2;
+               }
+           }
+         else
+           {
+             if (regs_ever_live[i+1] && ! call_used_regs[i+1])
+               {
+                 fprintf (file, "\tst %s,[%s+%d]\n",
+                          reg_names[i+1], base, offset + 4 * n_regs + 4);
+                 if (dwarf2out_do_frame ())
+                   dwarf2out_reg_save ("", i + 1, real_offset + 4 * n_regs + 4);
+                 n_regs += 2;
+               }
            }
        }
     }
@@ -3746,7 +3761,7 @@ function_arg_slotno (cum, mode, type, named, incoming_p, pregno, ppadding)
        }
 
       if (TARGET_ARCH32
-         || type && TREE_CODE (type) == UNION_TYPE)
+         || (type && TREE_CODE (type) == UNION_TYPE))
        {
          if (slotno >= SPARC_INT_ARG_MAX)
            return -1;
@@ -4145,7 +4160,7 @@ function_arg_pass_by_reference (cum, mode, type, named)
 {
   if (TARGET_ARCH32)
     {
-      return (type && AGGREGATE_TYPE_P (type)
+      return ((type && AGGREGATE_TYPE_P (type))
              || mode == TFmode || mode == TCmode);
     }
   else
@@ -5585,7 +5600,7 @@ sparc_flat_output_function_prologue (file, size)
 
   /* This is only for the human reader.  */
   fprintf (file, "\t%s#PROLOGUE# 0\n", ASM_COMMENT_START);
-  fprintf (file, "\t%s# vars= %d, regs= %d/%d, args= %d, extra= %d\n",
+  fprintf (file, "\t%s# vars= %ld, regs= %d/%d, args= %d, extra= %ld\n",
           ASM_COMMENT_START,
           current_frame_info.var_size,
           current_frame_info.gp_reg_size / 4,
index 9cfd3ac..f5ca073 100644 (file)
@@ -59,8 +59,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 # include <limits.h>
 #endif
 
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
 #endif
 
 #ifdef HAVE_STRING_H
@@ -271,7 +271,7 @@ extern void fancy_abort ();
 #endif
 static int lookup_import ();
 static int redundant_include_p ();
-static is_system_include ();
+static int is_system_include ();
 static struct file_name_map *read_name_map ();
 static char *read_filename_string ();
 static int open_include_file ();
@@ -615,7 +615,6 @@ make_assertion (pfile, option, str)
      char *option;
      U_CHAR *str;
 {
-  struct directive *kt;
   U_CHAR *buf, *p, *q;
 
   /* Copy the entire option so we can modify it.  */
@@ -1946,7 +1945,9 @@ cpp_expand_to_buffer (pfile, buf, length)
      int length;
 {
   register cpp_buffer *ip;
+#if 0
   cpp_buffer obuf;
+#endif
   U_CHAR *limit = buf + length;
   U_CHAR *buf1;
 #if 0
@@ -2087,8 +2088,6 @@ output_line_command (pfile, conditional, file_change)
      int conditional;
      enum file_change_code file_change;
 {
-  int len;
-  char *line_cmd_buf, *line_end;
   long line, col;
   cpp_buffer *ip = CPP_BUFFER (pfile);
 
@@ -2180,7 +2179,6 @@ macarg (pfile, rest_args)
 {
   int paren = 0;
   enum cpp_token token;
-  long arg_start = CPP_WRITTEN (pfile);
   char save_put_out_comments = CPP_OPTIONS (pfile)->put_out_comments;
   CPP_OPTIONS (pfile)->put_out_comments = 0;
 
@@ -2298,7 +2296,7 @@ special_symbol (hp, pfile)
      cpp_reader *pfile;
 {
   char *buf;
-  int i, len;
+  int len;
   int true_indepth;
   cpp_buffer *ip = NULL;
   struct tm *timebuf;
@@ -2438,7 +2436,7 @@ special_symbol (hp, pfile)
        goto oops;
       if (ip->cur[0] == 'L' && (ip->cur[1] == '\'' || ip->cur[1] == '"'))
        goto oops;
-      if (hp = cpp_lookup (pfile, ip->cur, -1, -1))
+      if ((hp = cpp_lookup (pfile, ip->cur, -1, -1)))
        {
 #if 0
          if (pcp_outfile && pcp_inside_if
@@ -3105,7 +3103,6 @@ do_include (pfile, keyword, unused1, unused2)
   int skip_dirs = (keyword->type == T_INCLUDE_NEXT);
   char *fname;         /* Dynamically allocated fname buffer */
   char *pcftry;
-  char *pcfname;
   U_CHAR *fbeg, *fend;         /* Beginning and end of fname */
   enum cpp_token token;
 
@@ -3119,12 +3116,12 @@ do_include (pfile, keyword, unused1, unused2)
 
   int f;                       /* file number */
 
-  int retried = 0;             /* Have already tried macro
-                                  expanding the include line */
   int angle_brackets = 0;      /* 0 for "...", 1 for <...> */
-  int pcf = -1;
   char *pcfbuf;
+#if 0
+  int pcf = -1;
   char *pcfbuflimit;
+#endif
   int pcfnum;
   f= -1;                       /* JF we iz paranoid! */
 
@@ -3730,7 +3727,6 @@ do_line (pfile, keyword)
   long old_written = CPP_WRITTEN (pfile);
   enum file_change_code file_change = same_file;
   enum cpp_token token;
-  int i;
 
   token = get_directive_token (pfile);
 
@@ -5602,7 +5598,9 @@ finclude (pfile, f, fname, system_header_p, dirptr)
   long i;
   int length;
   cpp_buffer *fp;                      /* For input stack frame */
+#if 0
   int missing_newline = 0;
+#endif
 
   if (fstat (f, &st) < 0)
     {
@@ -6657,7 +6655,6 @@ cpp_handle_options (pfile, argc, argv)
               Let's include also any that were specified earlier
               on the command line.  That way we can get rid of any
               that were passed automatically in from GCC.  */
-           int j;
            opts->inhibit_predefs = 1;
            for (ptr = &opts->pending; *ptr != NULL; )
              {
@@ -7136,7 +7133,7 @@ read_token_list (pfile, error_flag)
     {
       struct arglist *temp;
       long name_written = CPP_WRITTEN (pfile);
-      int eofp = 0;  int c;
+      int c;
 
       cpp_skip_hspace (pfile);
 
@@ -7419,7 +7416,6 @@ cpp_error_with_line (pfile, line, column, msg, arg1, arg2, arg3)
      char *msg;
      char *arg1, *arg2, *arg3;
 {
-  int i;
   cpp_buffer *ip = cpp_file_buffer (pfile);
 
   cpp_print_containing_files (pfile);
@@ -7437,7 +7433,6 @@ cpp_warning_with_line (pfile, line, column, msg, arg1, arg2, arg3)
      char *msg;
      char *arg1, *arg2, *arg3;
 {
-  int i;
   cpp_buffer *ip;
 
   if (CPP_OPTIONS (pfile)->inhibit_warnings)
@@ -7459,7 +7454,7 @@ cpp_warning_with_line (pfile, line, column, msg, arg1, arg2, arg3)
 void
 cpp_pedwarn_with_line (pfile, line, column, msg, arg1, arg2, arg3)
      cpp_reader *pfile;
-     int line;
+     int line, column;
      char *msg;
      char *arg1, *arg2, *arg3;
 {
@@ -7545,7 +7540,6 @@ cpp_error_from_errno (pfile, name)
      cpp_reader *pfile;
      char *name;
 {
-  int i;
   cpp_buffer *ip = cpp_file_buffer (pfile);
 
   cpp_print_containing_files (pfile);
index 406fb89..c9fb09e 100644 (file)
@@ -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
index 57e54ae..535647f 100644 (file)
@@ -507,7 +507,7 @@ regmove_optimize (f, nregs, regmove_dump_file)
               operand_number < insn_n_operands[insn_code_number];
               operand_number++)
            {
-             rtx p, src, dst, src_subreg;
+             rtx src, dst, src_subreg;
              enum reg_class src_class, dst_class;
 
              match_number = match.with[operand_number];
@@ -788,7 +788,7 @@ regmove_optimize (f, nregs, regmove_dump_file)
                    }
                  /* If there is a REG_DEAD note for DST on P, then remove
                     it, because DST is now set there.  */
-                 if (dst_note = find_reg_note (p, REG_DEAD, dst))
+                 if ((dst_note = find_reg_note (p, REG_DEAD, dst)))
                    remove_note (p, dst_note);
 
                  dstno = REGNO (dst);
@@ -868,8 +868,6 @@ find_matches (insn, matchp)
   for (operand_number = 0; operand_number < insn_n_operands[insn_code_number];
        operand_number++)
     {
-      int output_operand = 0;
-      int matching_operand = operand_number;
       char *p, c;
       int i = 0;
 
@@ -1218,7 +1216,7 @@ fixup_match_1 (insn, set, src, src_subreg, dst, backward, operand_number,
            }
        }
     }
-  if (0) ;
+  
 #if defined (HAVE_PRE_INCREMENT) || defined (HAVE_PRE_DECREMENT)
   else if ((code == PLUS || code == MINUS) && insn_const
           && try_auto_increment (p, insn, 0, src, insn_const, 1))
index d52a55b..60cbcc7 100644 (file)
@@ -119,6 +119,9 @@ Boston, MA 02111-1307, USA.  */
 \f
 #include "config.h"
 #include <stdio.h>
+#if HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
 #include "rtl.h"
 #include "basic-block.h"
 #include "regs.h"
@@ -179,7 +182,7 @@ static unsigned int *insn_blockage;
 #define UNIT_BLOCKED(B) ((B) >> (2 * BLOCKAGE_BITS))
 #define BLOCKAGE_RANGE(B) \
   (((((B) >> BLOCKAGE_BITS) & BLOCKAGE_MASK) << (HOST_BITS_PER_INT / 2)) \
-   | (B) & BLOCKAGE_MASK)
+   | ((B) & BLOCKAGE_MASK))
 
 /* Encodings of the `<name>_unit_blockage_range' function.  */
 #define MIN_BLOCKAGE_COST(R) ((R) >> (HOST_BITS_PER_INT / 2))
@@ -1866,7 +1869,7 @@ rank_for_schedule (x, y)
   int value;
 
   /* Choose the instruction with the highest priority, if different.  */
-  if (value = INSN_PRIORITY (tmp) - INSN_PRIORITY (tmp2))
+  if ((value = INSN_PRIORITY (tmp) - INSN_PRIORITY (tmp2)))
     return value;
 
   if (last_scheduled_insn)
@@ -1892,7 +1895,7 @@ rank_for_schedule (x, y)
       else
        tmp2_class = 2;
 
-      if (value = tmp_class - tmp2_class)
+      if ((value = tmp_class - tmp2_class))
        return value;
     }
 
@@ -3181,7 +3184,7 @@ schedule_block (b, file)
          register int stalls;
 
          for (stalls = 1; stalls < INSN_QUEUE_SIZE; stalls++)
-           if (insn = insn_queue[NEXT_Q_AFTER (q_ptr, stalls)])
+           if ((insn = insn_queue[NEXT_Q_AFTER (q_ptr, stalls)]))
              {
                for (; insn; insn = NEXT_INSN (insn))
                  {
@@ -3565,12 +3568,12 @@ regno_use_in (regno, x)
     {
       if (fmt[i] == 'e')
        {
-         if (tem = regno_use_in (regno, XEXP (x, i)))
+         if ((tem = regno_use_in (regno, XEXP (x, i))))
            return tem;
        }
       else if (fmt[i] == 'E')
        for (j = XVECLEN (x, i) - 1; j >= 0; j--)
-         if (tem = regno_use_in (regno , XVECEXP (x, i, j)))
+         if ((tem = regno_use_in (regno , XVECEXP (x, i, j))))
            return tem;
     }
 
@@ -4238,7 +4241,6 @@ schedule_insns (dump_file)
 {
   int max_uid = MAX_INSNS_PER_SPLIT * (get_max_uid () + 1);
   int b;
-  int i;
   rtx insn;
 
   /* Taking care of this degenerate case makes the rest of
index 264f50c..f7b659e 100644 (file)
@@ -39,6 +39,16 @@ Boston, MA 02111-1307, USA.  */
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
+#if HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
@@ -1300,7 +1310,7 @@ v_message_with_decl (decl, prefix, s, ap)
      char *s;
      va_list ap;
 {
-  char *n, *p;
+  char *p;
 
   fprintf (stderr, "%s:%d: ",
           DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl));
@@ -1906,6 +1916,7 @@ do_abort ()
 
 void
 botch (s)
+  char * s;
 {
   abort ();
 }
@@ -3734,7 +3745,7 @@ main (argc, argv, envp)
            optimize_size = 1;
          else
            {       
-             while (c = *p++)
+             while ((c = *p++))
                if (! (c >= '0' && c <= '9'))
                  break;
              if (c == 0)
index eda6187..e7138f7 100644 (file)
@@ -948,7 +948,9 @@ make_node (code)
   register int length;
   register struct obstack *obstack = current_obstack;
   register int i;
+#ifdef GATHER_STATISTICS
   register tree_node_kind kind;
+#endif
 
   switch (type)
     {
@@ -1419,9 +1421,6 @@ real_value_from_int_cst (type, i)
      tree type, i;
 {
   REAL_VALUE_TYPE d;
-  REAL_VALUE_TYPE e;
-  /* Some 386 compilers mishandle unsigned int to float conversions,
-     so introduce a temporary variable E to avoid those bugs.  */
 
 #ifdef REAL_ARITHMETIC
   if (! TREE_UNSIGNED (TREE_TYPE (i)))
@@ -1431,8 +1430,12 @@ real_value_from_int_cst (type, i)
     REAL_VALUE_FROM_UNSIGNED_INT (d, TREE_INT_CST_LOW (i),
                                  TREE_INT_CST_HIGH (i), TYPE_MODE (type));
 #else /* not REAL_ARITHMETIC */
+  /* Some 386 compilers mishandle unsigned int to float conversions,
+     so introduce a temporary variable E to avoid those bugs.  */
   if (TREE_INT_CST_HIGH (i) < 0 && ! TREE_UNSIGNED (TREE_TYPE (i)))
     {
+      REAL_VALUE_TYPE e;
+
       d = (double) (~ TREE_INT_CST_HIGH (i));
       e = ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))
            * (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)));
@@ -1443,6 +1446,8 @@ real_value_from_int_cst (type, i)
     }
   else
     {
+      REAL_VALUE_TYPE e;
+
       d = (double) (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (i);
       e = ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))
            * (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)));
@@ -1959,7 +1964,7 @@ tree_last (chain)
 {
   register tree next;
   if (chain)
-    while (next = TREE_CHAIN (chain))
+    while ((next = TREE_CHAIN (chain)))
       chain = next;
   return chain;
 }
@@ -2980,7 +2985,9 @@ build1 (code, type, node)
 {
   register struct obstack *obstack = expression_obstack;
   register int i, length;
+#ifdef GATHER_STATISTICS
   register tree_node_kind kind;
+#endif
   register tree t;
 
 #ifdef GATHER_STATISTICS
@@ -4611,7 +4618,7 @@ print_obstack_statistics (str, o)
       n_alloc += chunk->limit - &chunk->contents[0];
       chunk = chunk->prev;
     }
-  fprintf (stderr, "obstack %s: %lu bytes, %d chunks\n",
+  fprintf (stderr, "obstack %s: %u bytes, %d chunks\n",
           str, n_alloc, n_chunks);
 }
 
@@ -4621,8 +4628,10 @@ print_obstack_statistics (str, o)
 void
 dump_tree_statistics ()
 {
+#ifdef GATHER_STATISTICS
   int i;
   int total_nodes, total_bytes;
+#endif
 
   fprintf (stderr, "\n??? tree nodes created\n\n");
 #ifdef GATHER_STATISTICS