This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

egcs-980315 powerpc-ibm-aix4.1.4.0 warning fixes ...


	Here is yet another warning patch (YAWP).  This one fixes 129
warnings on powerpc-ibm-aix4.1.4.0.  Is it okay to install?

		Thanks,
		--Kaveh


Wed Mar 18 12:08:45 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * collect2.c (scan_prog_file): Add explicit braces to avoid
        ambiguous `else'.
 
        * dbxout.c (dbxout_type_fields): Add braces around empty body in
        an if-statement.
        (dbxout_type): Likewise.
 
        * rs6000.c (rs6000_override_options): Change type of `i', `j' and
        `ptt_size' from int to size_t.
        (rs6000_file_start): Likewise for `i'.
        (rs6000_replace_regno): Add default case in enumeration switch.
        (output_epilog): Remove unused variable `i'.
        (rs6000_longcall_ref): Remove unused variables `len', `p', `reg1'
        and `reg2'.
 
        * rs6000.h (ADDITIONAL_REGISTER_NAMES): Add missing braces around
        initializer.
        (get_issue_rate, non_logical_cint_operand,
        rs6000_output_load_toc_table, function_arg_padding): Add prototype.
 
        * rs6000.md (udivmodsi4): Add explicit braces to avoid ambiguous
        `else'.
 

diff -rup /tmp/gcc-testing/egcs-980315/gcc/collect2.c egcs-980315/gcc/collect2.c
--- /tmp/gcc-testing/egcs-980315/gcc/collect2.c	Mon Feb 23 03:58:16 1998
+++ egcs-980315/gcc/collect2.c	Wed Mar 18 10:36:40 1998
@@ -2894,12 +2894,14 @@ scan_prog_file (prog_name, which_pass)
 			     to explicitly export all global symbols or add
 			     them to import list.  */
 			  if (shared_obj) 
-			    if (which_pass == PASS_OBJ && (! export_flag))
-			      add_to_list (&exports, name);
-			    else if (! is_shared && which_pass == PASS_FIRST
-				     && import_flag
-				     && is_in_list(name, undefined.first))
-			      add_to_list (&imports, name);
+			    {
+			      if (which_pass == PASS_OBJ && (! export_flag))
+				add_to_list (&exports, name);
+			      else if (! is_shared && which_pass == PASS_FIRST
+				       && import_flag
+				       && is_in_list(name, undefined.first))
+				add_to_list (&imports, name);
+			    }
 #endif
 			  continue;
 			}
diff -rup /tmp/gcc-testing/egcs-980315/gcc/config/rs6000/rs6000.c egcs-980315/gcc/config/rs6000/rs6000.c
--- /tmp/gcc-testing/egcs-980315/gcc/config/rs6000/rs6000.c	Tue Feb 10 04:05:42 1998
+++ egcs-980315/gcc/config/rs6000/rs6000.c	Wed Mar 18 10:50:31 1998
@@ -157,7 +157,7 @@ void
 rs6000_override_options (default_cpu)
      char *default_cpu;
 {
-  int i, j;
+  size_t i, j;
   struct rs6000_cpu_select *ptr;
 
   /* Simplify the entries below by making a mask for any POWER
@@ -241,7 +241,7 @@ rs6000_override_options (default_cpu)
 	    MASK_POWERPC | MASK_SOFT_FLOAT | MASK_NEW_MNEMONICS,
 	    POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64}};
 
-  int ptt_size = sizeof (processor_target_table) / sizeof (struct ptt);
+  size_t ptt_size = sizeof (processor_target_table) / sizeof (struct ptt);
 
   int multiple = TARGET_MULTIPLE;	/* save current -mmultiple/-mno-multiple status */
   int string   = TARGET_STRING;		/* save current -mstring/-mno-string status */
@@ -337,7 +337,7 @@ rs6000_file_start (file, default_cpu)
      FILE *file;
      char *default_cpu;
 {
-  int i;
+  size_t i;
   char buffer[80];
   char *start = buffer;
   struct rs6000_cpu_select *ptr;
@@ -2210,6 +2210,9 @@ rs6000_replace_regno (x, from, reg)
 	}
 
       return x;
+
+    default:
+      break;
     }
 
   fmt = GET_RTX_FORMAT (GET_CODE (x));
@@ -3864,7 +3867,6 @@ output_epilog (file, size)
   rtx insn = get_last_insn ();
   int sp_reg = 1;
   int sp_offset = 0;
-  int i;
 
   /* If the last insn was a BARRIER, we don't have to write anything except
      the trace table.  */
@@ -4935,9 +4937,6 @@ rs6000_longcall_ref (call_ref)
      rtx call_ref;
 {
   char *call_name;
-  int len;
-  char *p;
-  rtx reg1, reg2;
   tree node;
 
   if (GET_CODE (call_ref) != SYMBOL_REF)
diff -rup /tmp/gcc-testing/egcs-980315/gcc/config/rs6000/rs6000.h egcs-980315/gcc/config/rs6000/rs6000.h
--- /tmp/gcc-testing/egcs-980315/gcc/config/rs6000/rs6000.h	Fri Mar  6 09:45:17 1998
+++ egcs-980315/gcc/config/rs6000/rs6000.h	Wed Mar 18 11:02:32 1998
@@ -2755,26 +2755,26 @@ extern char rs6000_reg_names[][8];	/* re
 /* Table of additional register names to use in user input.  */
 
 #define ADDITIONAL_REGISTER_NAMES \
- {"r0",    0, "r1",    1, "r2",    2, "r3",    3,	\
-  "r4",    4, "r5",    5, "r6",    6, "r7",    7,	\
-  "r8",    8, "r9",    9, "r10",  10, "r11",  11,	\
-  "r12",  12, "r13",  13, "r14",  14, "r15",  15,	\
-  "r16",  16, "r17",  17, "r18",  18, "r19",  19,	\
-  "r20",  20, "r21",  21, "r22",  22, "r23",  23,	\
-  "r24",  24, "r25",  25, "r26",  26, "r27",  27,	\
-  "r28",  28, "r29",  29, "r30",  30, "r31",  31,	\
-  "fr0",  32, "fr1",  33, "fr2",  34, "fr3",  35,	\
-  "fr4",  36, "fr5",  37, "fr6",  38, "fr7",  39,	\
-  "fr8",  40, "fr9",  41, "fr10", 42, "fr11", 43,	\
-  "fr12", 44, "fr13", 45, "fr14", 46, "fr15", 47,	\
-  "fr16", 48, "fr17", 49, "fr18", 50, "fr19", 51,	\
-  "fr20", 52, "fr21", 53, "fr22", 54, "fr23", 55,	\
-  "fr24", 56, "fr25", 57, "fr26", 58, "fr27", 59,	\
-  "fr28", 60, "fr29", 61, "fr30", 62, "fr31", 63,	\
-  /* no additional names for: mq, lr, ctr, ap */	\
-  "cr0",  68, "cr1",  69, "cr2",  70, "cr3",  71,	\
-  "cr4",  72, "cr5",  73, "cr6",  74, "cr7",  75,	\
-  "cc",   68, "sp",    1, "toc",   2 }
+ {{"r0",    0}, {"r1",    1}, {"r2",    2}, {"r3",    3},	\
+  {"r4",    4}, {"r5",    5}, {"r6",    6}, {"r7",    7},	\
+  {"r8",    8}, {"r9",    9}, {"r10",  10}, {"r11",  11},	\
+  {"r12",  12}, {"r13",  13}, {"r14",  14}, {"r15",  15},	\
+  {"r16",  16}, {"r17",  17}, {"r18",  18}, {"r19",  19},	\
+  {"r20",  20}, {"r21",  21}, {"r22",  22}, {"r23",  23},	\
+  {"r24",  24}, {"r25",  25}, {"r26",  26}, {"r27",  27},	\
+  {"r28",  28}, {"r29",  29}, {"r30",  30}, {"r31",  31},	\
+  {"fr0",  32}, {"fr1",  33}, {"fr2",  34}, {"fr3",  35},	\
+  {"fr4",  36}, {"fr5",  37}, {"fr6",  38}, {"fr7",  39},	\
+  {"fr8",  40}, {"fr9",  41}, {"fr10", 42}, {"fr11", 43},	\
+  {"fr12", 44}, {"fr13", 45}, {"fr14", 46}, {"fr15", 47},	\
+  {"fr16", 48}, {"fr17", 49}, {"fr18", 50}, {"fr19", 51},	\
+  {"fr20", 52}, {"fr21", 53}, {"fr22", 54}, {"fr23", 55},	\
+  {"fr24", 56}, {"fr25", 57}, {"fr26", 58}, {"fr27", 59},	\
+  {"fr28", 60}, {"fr29", 61}, {"fr30", 62}, {"fr31", 63},	\
+  /* no additional names for: mq, lr, ctr, ap */		\
+  {"cr0",  68}, {"cr1",  69}, {"cr2",  70}, {"cr3",  71},	\
+  {"cr4",  72}, {"cr5",  73}, {"cr6",  74}, {"cr7",  75},	\
+  {"cc",   68}, {"sp",    1}, {"toc",   2} }
 
 /* How to renumber registers for dbx and gdb.  */
 
@@ -3101,6 +3101,7 @@ extern struct rtx_def *rs6000_float_cons
 extern struct rtx_def *rs6000_immed_double_const ();
 extern struct rtx_def *rs6000_got_register ();
 extern int direct_return ();
+extern int get_issue_rate ();
 extern int any_operand ();
 extern int short_cint_operand ();
 extern int u_short_cint_operand ();
@@ -3120,6 +3121,7 @@ extern int offsettable_addr_operand ();
 extern int mem_or_easy_const_operand ();
 extern int add_operand ();
 extern int non_add_cint_operand ();
+extern int non_logical_cint_operand ();
 extern int logical_operand ();
 extern int non_logical_operand ();
 extern int mask_constant ();
@@ -3175,12 +3177,14 @@ extern int rs6000_adjust_cost ();
 extern void rs6000_trampoline_template ();
 extern int rs6000_trampoline_size ();
 extern void rs6000_initialize_trampoline ();
+extern void rs6000_output_load_toc_table ();
 extern int rs6000_comp_type_attributes ();
 extern int rs6000_valid_decl_attribute_p ();
 extern int rs6000_valid_type_attribute_p ();
 extern void rs6000_set_default_type_attributes ();
 extern struct rtx_def *rs6000_dll_import_ref ();
 extern struct rtx_def *rs6000_longcall_ref ();
+extern enum direction function_arg_padding ();
 
 /* See nonlocal_goto_receiver for when this must be set.  */
 
diff -rup /tmp/gcc-testing/egcs-980315/gcc/config/rs6000/rs6000.md egcs-980315/gcc/config/rs6000/rs6000.md
--- /tmp/gcc-testing/egcs-980315/gcc/config/rs6000/rs6000.md	Thu Feb 12 12:18:51 1998
+++ egcs-980315/gcc/config/rs6000/rs6000.md	Wed Mar 18 10:38:39 1998
@@ -1602,17 +1602,19 @@
   rtx label = 0;
 
   if (! TARGET_POWER)
-    if (! TARGET_POWERPC)
-      {
-	emit_move_insn (gen_rtx (REG, SImode, 3), operands[1]);
-	emit_move_insn (gen_rtx (REG, SImode, 4), operands[2]);
-	emit_insn (gen_divus_call ());
-	emit_move_insn (operands[0], gen_rtx (REG, SImode, 3));
-	emit_move_insn (operands[3], gen_rtx (REG, SImode, 4));
-	DONE;
-      }
-    else
-      FAIL;
+    {
+      if (! TARGET_POWERPC)
+        {
+	  emit_move_insn (gen_rtx (REG, SImode, 3), operands[1]);
+	  emit_move_insn (gen_rtx (REG, SImode, 4), operands[2]);
+	  emit_insn (gen_divus_call ());
+	  emit_move_insn (operands[0], gen_rtx (REG, SImode, 3));
+	  emit_move_insn (operands[3], gen_rtx (REG, SImode, 4));
+	  DONE;
+        }
+      else
+        FAIL;
+    }
 
   if (GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) < 0)
     {
diff -rup /tmp/gcc-testing/egcs-980315/gcc/dbxout.c egcs-980315/gcc/dbxout.c
--- /tmp/gcc-testing/egcs-980315/gcc/dbxout.c	Wed Mar 11 18:34:31 1998
+++ egcs-980315/gcc/dbxout.c	Wed Mar 18 10:25:23 1998
@@ -657,7 +657,9 @@ dbxout_type_fields (type)
 	  /* Continue the line if necessary,
 	     but not before the first field.  */
 	  if (tem != TYPE_FIELDS (type))
-	    CONTIN;
+	    {
+	      CONTIN;
+	    }
 
 	  if (use_gnu_debug_info_extensions
 	      && flag_minimal_debug
@@ -1438,7 +1440,9 @@ dbxout_type (type, full, show_arg_types)
 	  fprintf (asmfile, ",");
 	  CHARS (20 + IDENTIFIER_LENGTH (TREE_PURPOSE (tem)));
 	  if (TREE_CHAIN (tem) != 0)
-	    CONTIN;
+	    {
+	      CONTIN;
+	    }
 	}
       putc (';', asmfile);
       CHARS (1);
--
Kaveh R. Ghazi			Project Manager / Custom Development
ghazi@caip.rutgers.edu		Icon CMT Corp.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]