dbxout.c (lastfile, cwd): Fix `unused' warning.
authorKaveh Ghazi <ghazi@gcc.gnu.org>
Thu, 16 Jan 2003 15:37:57 +0000 (15:37 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Thu, 16 Jan 2003 15:37:57 +0000 (15:37 +0000)
* dbxout.c (lastfile, cwd): Fix `unused' warning.
* dwarf2out.c (fde_table_in_use, current_funcdef_fde,
dw_cfi_oprnd1_desc, dw_cfi_oprnd2_desc, next_die_offset,
is_main_source, file_table, decl_die_table_in_use,
abbrev_die_table_in_use, line_info_table_in_use,
separate_line_info_table_in_use, pubname_table_in_use,
arange_table_in_use, ranges_table_in_use,
current_function_has_inlines): Likewise.
* flow.c (life_analysis): Likewise.
* genemit.c (gen_insn): Likewise.
* protoize.c (cplus_suffix): Likewise.

From-SVN: r61392

gcc/dbxout.c
gcc/dwarf2out.c
gcc/flow.c
gcc/genemit.c
gcc/protoize.c

index 480ef821b70c48d855f88ef448672a9d0eb26937..468ee0969d386c01aacab024776c1be26e75c823 100644 (file)
@@ -137,14 +137,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #define STABS_GCC_MARKER "gcc2_compiled."
 #endif
 
-/* Last source file name mentioned in a NOTE insn.  */
-
-static const char *lastfile;
-
-/* Current working directory.  */
-
-static const char *cwd;
-
 enum typestatus {TYPE_UNSEEN, TYPE_XREF, TYPE_DEFINED};
 
 /* Structure recording information about a C data type.
@@ -202,6 +194,14 @@ static GTY(()) int next_file_number;
 
 #if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
 
+/* Last source file name mentioned in a NOTE insn.  */
+
+static const char *lastfile;
+
+/* Current working directory.  */
+
+static const char *cwd;
+
 /* Nonzero if we have actually used any of the GDB extensions
    to the debugging format.  The idea is that we use them for the
    first time only if there's a strong reason, but once we have done that,
index 38d340025330ff32db0e35c270ae83da1f7fa60f..f16d3b221150a1f01b4a21a951102fb2c9449ffc 100644 (file)
@@ -279,8 +279,10 @@ static GTY((length ("fde_table_allocated"))) dw_fde_ref fde_table;
 /* Number of elements currently allocated for fde_table.  */
 static unsigned fde_table_allocated;
 
+#if defined (DWARF2_DEBUGGING_INFO) || defined (DWARF2_UNWIND_INFO)
 /* Number of elements in fde_table currently in use.  */
 static unsigned fde_table_in_use;
+#endif
 
 /* Size (in elements) of increments by which we may expand the
    fde_table.  */
@@ -289,11 +291,13 @@ static unsigned fde_table_in_use;
 /* A list of call frame insns for the CIE.  */
 static GTY(()) dw_cfi_ref cie_cfi_head;
 
+#if defined (DWARF2_DEBUGGING_INFO) || defined (DWARF2_UNWIND_INFO)
 /* Some DWARF extensions (e.g., MIPS/SGI) implement a subprogram
    attribute that accelerates the lookup of the FDE associated
    with the subprogram.  This variable holds the table index of the FDE
    associated with the current function (body) definition.  */
 static unsigned current_funcdef_fde;
+#endif
 
 struct indirect_string_node GTY(())
 {
@@ -324,10 +328,6 @@ static void reg_save                       PARAMS ((const char *, unsigned,
 static void initial_return_save                PARAMS ((rtx));
 static long stack_adjust_offset                PARAMS ((rtx));
 static void output_cfi                 PARAMS ((dw_cfi_ref, dw_fde_ref, int));
-static enum dw_cfi_oprnd_type dw_cfi_oprnd1_desc 
-   PARAMS ((enum dwarf_call_frame_info cfi));
-static enum dw_cfi_oprnd_type dw_cfi_oprnd2_desc 
-   PARAMS ((enum dwarf_call_frame_info cfi));
 static void output_call_frame_info     PARAMS ((int));
 static void dwarf2out_stack_adjust     PARAMS ((rtx));
 static void queue_reg_save             PARAMS ((const char *, rtx, long));
@@ -1699,6 +1699,8 @@ dwarf2out_frame_debug (insn)
 #endif
 
 /* Describe for the GTY machinery what parts of dw_cfi_oprnd1 are used.  */
+static enum dw_cfi_oprnd_type dw_cfi_oprnd1_desc 
+   PARAMS ((enum dwarf_call_frame_info cfi));
 
 static enum dw_cfi_oprnd_type
 dw_cfi_oprnd1_desc (cfi)
@@ -1744,6 +1746,8 @@ dw_cfi_oprnd1_desc (cfi)
 }
 
 /* Describe for the GTY machinery what parts of dw_cfi_oprnd2 are used.  */
+static enum dw_cfi_oprnd_type dw_cfi_oprnd2_desc 
+   PARAMS ((enum dwarf_call_frame_info cfi));
 
 static enum dw_cfi_oprnd_type
 dw_cfi_oprnd2_desc (cfi)
@@ -3436,16 +3440,20 @@ limbo_die_node;
    is not made available by the GCC front-end.  */
 #define        DWARF_LINE_DEFAULT_IS_STMT_START 1
 
+#ifdef DWARF2_DEBUGGING_INFO
 /* This location is used by calc_die_sizes() to keep track
    the offset of each DIE within the .debug_info section.  */
 static unsigned long next_die_offset;
+#endif
 
 /* Record the root of the DIE's built for the current compilation unit.  */
 static GTY(()) dw_die_ref comp_unit_die;
 
+#ifdef DWARF2_DEBUGGING_INFO
 /* We need special handling in dwarf2out_start_source_file if it is
    first one.  */
 static int is_main_source;
+#endif
 
 /* A list of DIEs with a NULL parent waiting to be relocated.  */
 static GTY(()) limbo_die_node *limbo_die_list;
@@ -3463,8 +3471,10 @@ struct file_table
    table.  */
 #define FILE_TABLE_INCREMENT 64
 
+#ifdef DWARF2_DEBUGGING_INFO
 /* Filenames referenced by this compilation unit.  */
 static struct file_table file_table;
+#endif
 
 /* A pointer to the base of a table of references to DIE's that describe
    declarations.  The table is indexed by DECL_UID() which is a unique
@@ -3474,8 +3484,10 @@ static GTY((length ("decl_die_table_allocated"))) dw_die_ref *decl_die_table;
 /* Number of elements currently allocated for the decl_die_table.  */
 static unsigned decl_die_table_allocated;
 
+#ifdef DWARF2_DEBUGGING_INFO
 /* Number of elements in decl_die_table currently in use.  */
 static unsigned decl_die_table_in_use;
+#endif
 
 /* Size (in elements) of increments by which we may expand the
    decl_die_table.  */
@@ -3490,8 +3502,10 @@ static GTY((length ("abbrev_die_table_allocated")))
 /* Number of elements currently allocated for abbrev_die_table.  */
 static unsigned abbrev_die_table_allocated;
 
+#ifdef DWARF2_DEBUGGING_INFO
 /* Number of elements in type_die_table currently in use.  */
 static unsigned abbrev_die_table_in_use;
+#endif
 
 /* Size (in elements) of increments by which we may expand the
    abbrev_die_table.  */
@@ -3505,8 +3519,10 @@ static GTY((length ("line_info_table_allocated")))
 /* Number of elements currently allocated for line_info_table.  */
 static unsigned line_info_table_allocated;
 
+#ifdef DWARF2_DEBUGGING_INFO
 /* Number of elements in line_info_table currently in use.  */
 static unsigned line_info_table_in_use;
+#endif
 
 /* A pointer to the base of a table that contains line information
    for each source code line outside of .text in the compilation unit.  */
@@ -3516,8 +3532,10 @@ static GTY ((length ("separate_line_info_table_allocated")))
 /* Number of elements currently allocated for separate_line_info_table.  */
 static unsigned separate_line_info_table_allocated;
 
+#ifdef DWARF2_DEBUGGING_INFO
 /* Number of elements in separate_line_info_table currently in use.  */
 static unsigned separate_line_info_table_in_use;
+#endif
 
 /* Size (in elements) of increments by which we may expand the
    line_info_table.  */
@@ -3530,8 +3548,10 @@ static GTY ((length ("pubname_table_allocated"))) pubname_ref pubname_table;
 /* Number of elements currently allocated for pubname_table.  */
 static unsigned pubname_table_allocated;
 
+#ifdef DWARF2_DEBUGGING_INFO
 /* Number of elements in pubname_table currently in use.  */
 static unsigned pubname_table_in_use;
+#endif
 
 /* Size (in elements) of increments by which we may expand the
    pubname_table.  */
@@ -3543,8 +3563,10 @@ static GTY((length ("arange_table_allocated"))) dw_die_ref *arange_table;
 /* Number of elements currently allocated for arange_table.  */
 static unsigned arange_table_allocated;
 
+#ifdef DWARF2_DEBUGGING_INFO
 /* Number of elements in arange_table currently in use.  */
 static unsigned arange_table_in_use;
+#endif
 
 /* Size (in elements) of increments by which we may expand the
    arange_table.  */
@@ -3556,6 +3578,7 @@ static GTY ((length ("ranges_table_allocated"))) dw_ranges_ref ranges_table;
 /* Number of elements currently allocated for ranges_table.  */
 static unsigned ranges_table_allocated;
 
+#ifdef DWARF2_DEBUGGING_INFO
 /* Number of elements in ranges_table currently in use.  */
 static unsigned ranges_table_in_use;
 
@@ -3568,6 +3591,7 @@ static unsigned have_location_lists;
 
 /* Record whether the function being analyzed contains inlined functions.  */
 static int current_function_has_inlines;
+#endif
 #if 0 && defined (MIPS_DEBUGGING_INFO)
 static int comp_unit_has_inlines;
 #endif
index 7046290bdefdd60d32097a7c8559c1eadffcf87d..81f1be101cfc203081d157593cf11a64ccd2210d 100644 (file)
@@ -416,8 +416,8 @@ life_analysis (f, file, flags)
      FILE *file;
      int flags;
 {
-  int i;
 #ifdef ELIMINABLE_REGS
+  int i;
   static const struct {const int from, to; } eliminables[] = ELIMINABLE_REGS;
 #endif
 
@@ -436,8 +436,11 @@ life_analysis (f, file, flags)
 
 #ifdef CANNOT_CHANGE_MODE_CLASS
   if (flags & PROP_REG_INFO)
-    for (i=0; i < NUM_MACHINE_MODES; ++i)
-      INIT_REG_SET (&subregs_of_mode[i]);
+    {
+      int j;
+      for (j=0; j < NUM_MACHINE_MODES; ++j)
+       INIT_REG_SET (&subregs_of_mode[j]);
+    }
 #endif
 
   if (! optimize)
index cb15f699d29e99bdda2ba142af097968faf53019..b86dc994419fc74e7bf672ef977d21fae73bfee2 100644 (file)
@@ -404,7 +404,7 @@ gen_insn (insn, lineno)
       printf ("operand%d", i);
   printf (")\n");
   for (i = 0; i < operands; i++)
-    printf ("     rtx operand%d;\n", i);
+    printf ("     rtx operand%d ATTRIBUTE_UNUSED;\n", i);
   printf ("{\n");
 
   /* Output code to construct and return the rtl for the instruction body */
index ce51ba26f4ad9ffff44c12246b375d5eb6507f6a..dfaa38051e16db31d5e4c88397bdee16db2b012f 100644 (file)
@@ -140,12 +140,12 @@ static const char * const aux_info_suffix = AUX_INFO_SUFFIX;
 
 static const char * const save_suffix = SAVE_SUFFIX;
 
+#ifndef UNPROTOIZE
+
 /* String to attach to C filenames renamed to C++.  */
 
 static const char * const cplus_suffix = CPLUS_FILE_SUFFIX;
 
-#ifndef UNPROTOIZE
-
 /* File name of the file which contains descriptions of standard system
    routines.  Note that we never actually do anything with this file per se,
    but we do read in its corresponding aux_info file.  */