This is the mail archive of the gcc-patches@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 CVS 19980621, warning patch part 7/7


	This is warning patch part 7/7.  Okay to install?

(I'm not sure about making types SFmode/DFmode in fp-bit.c be explicit
ints but that's what the message said they defaulted to prior to my patch.

Also please double check where I added parens around & to make sure
I got the author's intentions correct.)



Sun Jun 21 19:41:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* Makefile.in (xcoffout.o): Depend on toplev.h and output.h.

	* config/fp-bit.c (SFtype, DFtype): Make type `int' explicit.
	(_fpmul_parts): Move variables `x', `ylow', `yhigh' and `bit' into
	the scope in which they are used.
	(_fpdiv_parts): Remove unused variables `low', `high', `r0', `r1',
	`y0', `y1', `q', `remainder', `carry', `d0' and `d1'.

	* rs6000.c: Move include of output.h below tree.h.  Include toplev.h.
	(any_operand): Mark unused parameters `op' and `mode' with
	ATTRIBUTE_UNUSED. 
	(count_register_operand): Likewise for parameter `mode'.
	(fpmem_operand): Likewise.
	(short_cint_operand): Likewise.
	(u_short_cint_operand): Likewise.
	(non_short_cint_operand): Likewise.
	(got_operand): Likewise.
	(got_no_const_operand): Likewise.
	(non_add_cint_operand): Likewise.
	(non_logical_cint_operand): Likewise.
	(mask_operand): Likewise.
	(current_file_function_operand): Likewise.
	(small_data_operand): Likewise for parameters `op' and `mode'.
	(init_cumulative_args): Likewise for parameter `libname'.
	(function_arg_pass_by_reference): Likewise for parameters `cum',
	`mode' and `named'.
	(expand_builtin_saveregs): Likewise for parameter `args'.
	(load_multiple_operation): Likewise for parameter `mode'.
	(store_multiple_operation): Likewise.
	(branch_comparison_operator): Likewise.
	(secondary_reload_class): Likewise.
	(print_operand): Add parentheses around & operation.
	(output_prolog): Mark parameter `size' with ATTRIBUTE_UNUSED.
	(output_epilog): Likewise.  Cast argument to fprintf to int.
	(rs6000_adjust_cost): Mark parameter `dep_insn' with ATTRIBUTE_UNUSED.
	(rs6000_valid_decl_attribute_p): Likewise for parameters `decl',
	`attributes', `identifier' and `args'.
	(rs6000_valid_type_attribute_p): Likewise for parameter `attributes'.
	(rs6000_comp_type_attributes): Likewise for parameters `type1' and
	`type2'.
	(rs6000_set_default_type_attributes): Likewise for parameter `type'.

	* rs6000.h (RTX_COSTS): Add parentheses around & operation.
	(toc_section, private_data_section, trap_comparison_operator): Add
	prototypes.

	* dbxout.h (dbxout_parms, dbxout_reg_parms, dbxout_syms): Add
	prototypes.

	* xcoffout.c: Include toplev.h, outout.h and dbxout.h.

	* xcoffout.h (stab_to_sclass, xcoffout_begin_function,
	xcoffout_begin_block, xcoffout_end_epilogue,
	xcoffout_end_function, xcoffout_end_block,
	xcoff_output_standard_types, xcoffout_declare_function,
	xcoffout_source_line): Add prototypes.
	

diff -rup orig/egcs-CVS19980621/gcc/Makefile.in egcs-CVS19980621/gcc/Makefile.in
--- orig/egcs-CVS19980621/gcc/Makefile.in	Sun Jun 21 08:43:44 1998
+++ egcs-CVS19980621/gcc/Makefile.in	Sun Jun 21 18:48:51 1998
@@ -1405,7 +1405,7 @@ dwarf2out.o : dwarf2out.c $(CONFIG_H) sy
    flags.h insn-config.h insn-codes.h reload.h output.h defaults.h \
    hard-reg-set.h regs.h expr.h toplev.h dwarf2out.h
 xcoffout.o : xcoffout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) xcoffout.h \
-   flags.h
+   flags.h toplev.h output.h
 emit-rtl.o : emit-rtl.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
    except.h function.h regs.h insn-config.h insn-codes.h $(RECOG_H) real.h \
    expr.h obstack.h hard-reg-set.h bitmap.h
diff -rup orig/egcs-CVS19980621/gcc/config/fp-bit.c egcs-CVS19980621/gcc/config/fp-bit.c
--- orig/egcs-CVS19980621/gcc/config/fp-bit.c	Sun Jun 21 08:41:24 1998
+++ egcs-CVS19980621/gcc/config/fp-bit.c	Sun Jun 21 18:21:57 1998
@@ -153,8 +153,8 @@ __trunctfdf2 (){ abort(); }
 #else	/* !EXTENDED_FLOAT_STUBS, rest of file */
 
 
-typedef SFtype __attribute__ ((mode (SF)));
-typedef DFtype __attribute__ ((mode (DF)));
+typedef int SFtype __attribute__ ((mode (SF)));
+typedef int DFtype __attribute__ ((mode (DF)));
 
 typedef int HItype __attribute__ ((mode (HI)));
 typedef int SItype __attribute__ ((mode (SI)));
@@ -855,13 +855,13 @@ _fpmul_parts ( fp_number_type *  a,
   /* Calculate the mantissa by multiplying both 64bit numbers to get a
      128 bit number */
   {
-    fractype x = a->fraction.ll;
-    fractype ylow = b->fraction.ll;
-    fractype yhigh = 0;
-    int bit;
-
 #if defined(NO_DI_MODE)
     {
+      fractype x = a->fraction.ll;
+      fractype ylow = b->fraction.ll;
+      fractype yhigh = 0;
+      int bit;
+
       /* ??? This does multiplies one bit at a time.  Optimize.  */
       for (bit = 0; bit < FRAC_NBITS; bit++)
 	{
@@ -1000,14 +1000,10 @@ _fpdiv_parts (fp_number_type * a,
 	      fp_number_type * b,
 	      fp_number_type * tmp)
 {
-  fractype low = 0;
-  fractype high = 0;
-  fractype r0, r1, y0, y1, bit;
-  fractype q;
+  fractype bit;
   fractype numerator;
   fractype denominator;
   fractype quotient;
-  fractype remainder;
 
   if (isnan (a))
     {
@@ -1042,9 +1038,6 @@ _fpdiv_parts (fp_number_type * a,
   /* Calculate the mantissa by multiplying both 64bit numbers to get a
      128 bit number */
   {
-    int carry;
-    intfrac d0, d1;		/* weren't unsigned before ??? */
-
     /* quotient =
        ( numerator / denominator) * 2^(numerator exponent -  denominator exponent)
      */
diff -rup orig/egcs-CVS19980621/gcc/config/rs6000/rs6000.c egcs-CVS19980621/gcc/config/rs6000/rs6000.c
--- orig/egcs-CVS19980621/gcc/config/rs6000/rs6000.c	Sun Jun 21 08:42:59 1998
+++ egcs-CVS19980621/gcc/config/rs6000/rs6000.c	Sun Jun 21 19:11:59 1998
@@ -28,7 +28,6 @@ Boston, MA 02111-1307, USA.  */
 #include "insn-config.h"
 #include "conditions.h"
 #include "insn-flags.h"
-#include "output.h"
 #include "insn-attr.h"
 #include "flags.h"
 #include "recog.h"
@@ -37,6 +36,8 @@ Boston, MA 02111-1307, USA.  */
 #include "tree.h"
 #include "except.h"
 #include "function.h"
+#include "output.h"
+#include "toplev.h"
 
 #ifndef TARGET_NO_PROTOTYPE
 #define TARGET_NO_PROTOTYPE 0
@@ -420,8 +421,8 @@ direct_return ()
 
 int
 any_operand (op, mode)
-     register rtx op;
-     enum machine_mode mode;
+     register rtx op ATTRIBUTE_UNUSED;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   return 1;
 }
@@ -430,7 +431,7 @@ any_operand (op, mode)
 int
 count_register_operand(op, mode)
      register rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   if (GET_CODE (op) != REG)
     return 0;
@@ -449,7 +450,7 @@ count_register_operand(op, mode)
 int
 fpmem_operand(op, mode)
      register rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   if (GET_CODE (op) != REG)
     return 0;
@@ -470,7 +471,7 @@ fpmem_operand(op, mode)
 int
 short_cint_operand (op, mode)
      register rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   return (GET_CODE (op) == CONST_INT
 	  && (unsigned HOST_WIDE_INT) (INTVAL (op) + 0x8000) < 0x10000);
@@ -481,7 +482,7 @@ short_cint_operand (op, mode)
 int
 u_short_cint_operand (op, mode)
      register rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   return (GET_CODE (op) == CONST_INT
 	  && (INTVAL (op) & (~ (HOST_WIDE_INT) 0xffff)) == 0);
@@ -492,7 +493,7 @@ u_short_cint_operand (op, mode)
 int
 non_short_cint_operand (op, mode)
      register rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   return (GET_CODE (op) == CONST_INT
 	  && (unsigned HOST_WIDE_INT) (INTVAL (op) + 0x8000) >= 0x10000);
@@ -583,7 +584,7 @@ reg_or_cint_operand (op, mode)
 int
 got_operand (op, mode)
      register rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   return (GET_CODE (op) == SYMBOL_REF
 	  || GET_CODE (op) == CONST
@@ -596,7 +597,7 @@ got_operand (op, mode)
 int
 got_no_const_operand (op, mode)
      register rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   return (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == LABEL_REF);
 }
@@ -841,7 +842,7 @@ add_operand (op, mode)
 int
 non_add_cint_operand (op, mode)
      register rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   return (GET_CODE (op) == CONST_INT
 	  && (unsigned HOST_WIDE_INT) (INTVAL (op) + 0x8000) >= 0x10000
@@ -868,7 +869,7 @@ logical_operand (op, mode)
 int
 non_logical_cint_operand (op, mode)
      register rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   return (GET_CODE (op) == CONST_INT
 	  && (INTVAL (op) & (~ (HOST_WIDE_INT) 0xffff)) != 0
@@ -905,7 +906,7 @@ mask_constant (c)
 int
 mask_operand (op, mode)
      register rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   return GET_CODE (op) == CONST_INT && mask_constant (INTVAL (op));
 }
@@ -1066,7 +1067,7 @@ call_operand (op, mode)
 int
 current_file_function_operand (op, mode)
      register rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   return (GET_CODE (op) == SYMBOL_REF
 	  && (SYMBOL_REF_FLAG (op)
@@ -1132,8 +1133,8 @@ input_operand (op, mode)
 
 int
 small_data_operand (op, mode)
-     rtx op;
-     enum machine_mode mode;
+     rtx op ATTRIBUTE_UNUSED;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
 #if TARGET_ELF
   rtx sym_ref, const_part;
@@ -1189,7 +1190,7 @@ void
 init_cumulative_args (cum, fntype, libname, incoming)
      CUMULATIVE_ARGS *cum;
      tree fntype;
-     rtx libname;
+     rtx libname ATTRIBUTE_UNUSED;
      int incoming;
 {
   static CUMULATIVE_ARGS zero_cumulative;
@@ -1524,10 +1525,10 @@ function_arg_partial_nregs (cum, mode, t
 
 int
 function_arg_pass_by_reference (cum, mode, type, named)
-     CUMULATIVE_ARGS *cum;
-     enum machine_mode mode;
+     CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
      tree type;
-     int named;
+     int named ATTRIBUTE_UNUSED;
 {
   if ((DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS)
       && type && AGGREGATE_TYPE_P (type))
@@ -1652,7 +1653,7 @@ setup_incoming_varargs (cum, mode, type,
 
 struct rtx_def *
 expand_builtin_saveregs (args)
-     tree args;
+     tree args ATTRIBUTE_UNUSED;
 {
   return virtual_incoming_args_rtx;
 }
@@ -1899,7 +1900,7 @@ expand_block_move (operands)
 int
 load_multiple_operation (op, mode)
      rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   int count = XVECLEN (op, 0);
   int dest_regno;
@@ -1942,7 +1943,7 @@ load_multiple_operation (op, mode)
 int
 store_multiple_operation (op, mode)
      rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   int count = XVECLEN (op, 0) - 1;
   int src_regno;
@@ -1985,7 +1986,7 @@ store_multiple_operation (op, mode)
 int
 branch_comparison_operator (op, mode)
      register rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   enum rtx_code code = GET_CODE (op);
   enum machine_mode cc_mode;
@@ -2165,7 +2166,7 @@ addrs_ok_for_quad_peep (addr1, addr2)
 enum reg_class
 secondary_reload_class (class, mode, in)
      enum reg_class class;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
      rtx in;
 {
   int regno = true_regnum (in);
@@ -2534,7 +2535,7 @@ print_operand (file, x, code)
     case 'B':
       /* If the low-order bit is zero, write 'r'; otherwise, write 'l'
 	 for 64-bit mask direction.  */
-      putc ((INT_LOWPART(x) & 1 == 0 ? 'r' : 'l'), file);
+      putc (((INT_LOWPART(x) & 1) == 0 ? 'r' : 'l'), file);
 
     case 'C':
       /* This is an optional cror needed for LE or GE floating-point
@@ -3798,7 +3799,7 @@ rs6000_allocate_stack_space (file, size,
 void
 output_prolog (file, size)
      FILE *file;
-     int size;
+     int size ATTRIBUTE_UNUSED;
 {
   rs6000_stack_t *info = rs6000_stack_info ();
   int reg_size = info->reg_size;
@@ -4054,7 +4055,7 @@ output_prolog (file, size)
 void
 output_epilog (file, size)
      FILE *file;
-     int size;
+     int size ATTRIBUTE_UNUSED;
 {
   rs6000_stack_t *info = rs6000_stack_info ();
   char *load_reg = (TARGET_32BIT) ? "\t{l|lwz} %s,%d(%s)\n" : "\tld %s,%d(%s)\n";
@@ -4337,7 +4338,7 @@ output_epilog (file, size)
       /* Omit this list of longs, because there are no CTL anchors.  */
 
       /* Length of function name.  */
-      fprintf (file, "\t.short %d\n", strlen (fname));
+      fprintf (file, "\t.short %d\n", (int) strlen (fname));
 
       /* Function name.  */
       assemble_string (fname, strlen (fname));
@@ -4757,7 +4758,7 @@ int
 rs6000_adjust_cost (insn, link, dep_insn, cost)
      rtx insn;
      rtx link;
-     rtx dep_insn;
+     rtx dep_insn ATTRIBUTE_UNUSED;
      int cost;
 {
   if (! recog_memoized (insn))
@@ -4979,10 +4980,10 @@ rs6000_initialize_trampoline (addr, fnad
 
 int
 rs6000_valid_decl_attribute_p (decl, attributes, identifier, args)
-     tree decl;
-     tree attributes;
-     tree identifier;
-     tree args;
+     tree decl ATTRIBUTE_UNUSED;
+     tree attributes ATTRIBUTE_UNUSED;
+     tree identifier ATTRIBUTE_UNUSED;
+     tree args ATTRIBUTE_UNUSED;
 {
   return 0;
 }
@@ -4994,7 +4995,7 @@ rs6000_valid_decl_attribute_p (decl, att
 int
 rs6000_valid_type_attribute_p (type, attributes, identifier, args)
      tree type;
-     tree attributes;
+     tree attributes ATTRIBUTE_UNUSED;
      tree identifier;
      tree args;
 {
@@ -5063,8 +5064,8 @@ rs6000_valid_type_attribute_p (type, att
 
 int
 rs6000_comp_type_attributes (type1, type2)
-     tree type1;
-     tree type2;
+     tree type1 ATTRIBUTE_UNUSED;
+     tree type2 ATTRIBUTE_UNUSED;
 {
   return 1;
 }
@@ -5074,7 +5075,7 @@ rs6000_comp_type_attributes (type1, type
 
 void
 rs6000_set_default_type_attributes (type)
-     tree type;
+     tree type ATTRIBUTE_UNUSED;
 {
 }
 
diff -rup orig/egcs-CVS19980621/gcc/config/rs6000/rs6000.h egcs-CVS19980621/gcc/config/rs6000/rs6000.h
--- orig/egcs-CVS19980621/gcc/config/rs6000/rs6000.h	Sun Jun 21 08:43:00 1998
+++ egcs-CVS19980621/gcc/config/rs6000/rs6000.h	Sun Jun 21 18:56:30 1998
@@ -2183,7 +2183,7 @@ do {                                    
     return ((GET_CODE (XEXP (X, 1)) == CONST_INT			\
 	     && ((unsigned HOST_WIDE_INT) (INTVAL (XEXP (X, 1))		\
 					   + 0x8000) >= 0x10000)	\
-	     && (INTVAL (XEXP (X, 1)) & 0xffff != 0))			\
+	     && ((INTVAL (XEXP (X, 1)) & 0xffff) != 0))			\
 	    ? COSTS_N_INSNS (2)						\
 	    : COSTS_N_INSNS (1));					\
   case AND:								\
@@ -2191,7 +2191,7 @@ do {                                    
   case XOR:								\
     return ((GET_CODE (XEXP (X, 1)) == CONST_INT			\
 	     && (INTVAL (XEXP (X, 1)) & (~ (HOST_WIDE_INT) 0xffff)) != 0 \
-	     && (INTVAL (XEXP (X, 1)) & 0xffff != 0))			\
+	     && ((INTVAL (XEXP (X, 1)) & 0xffff) != 0))			\
 	    ? COSTS_N_INSNS (2)						\
 	    : COSTS_N_INSNS (1));					\
   case MULT:								\
@@ -3240,6 +3240,9 @@ extern void rs6000_set_default_type_attr
 extern struct rtx_def *rs6000_dll_import_ref ();
 extern struct rtx_def *rs6000_longcall_ref ();
 extern int function_arg_padding ();
+extern void toc_section ();
+extern void private_data_section ();
+extern int trap_comparison_operator ();
 
 /* See nonlocal_goto_receiver for when this must be set.  */
 
diff -rup orig/egcs-CVS19980621/gcc/dbxout.h egcs-CVS19980621/gcc/dbxout.h
--- orig/egcs-CVS19980621/gcc/dbxout.h	Sun Jun 21 08:49:54 1998
+++ egcs-CVS19980621/gcc/dbxout.h	Sun Jun 21 18:46:16 1998
@@ -25,6 +25,9 @@ extern void dbxout_start_new_source_file
 extern void dbxout_resume_previous_source_file	PROTO ((void));
 
 extern void dbxout_symbol		PROTO ((tree, int));
+extern void dbxout_parms		PROTO ((tree));
+extern void dbxout_reg_parms		PROTO ((tree));
+extern void dbxout_syms			PROTO ((tree));
 extern void dbxout_function		PROTO ((tree));
 extern void dbxout_source_line		PROTO ((FILE *, char*, int));
 extern void dbxout_begin_function	PROTO ((tree));
diff -rup orig/egcs-CVS19980621/gcc/xcoffout.c egcs-CVS19980621/gcc/xcoffout.c
--- orig/egcs-CVS19980621/gcc/xcoffout.c	Sun Jun 21 08:45:15 1998
+++ egcs-CVS19980621/gcc/xcoffout.c	Sun Jun 21 18:48:41 1998
@@ -29,6 +29,8 @@ Boston, MA 02111-1307, USA.  */
 #include "tree.h"
 #include "rtl.h"
 #include "flags.h"
+#include "toplev.h"
+#include "output.h"
 
 #ifdef XCOFF_DEBUGGING_INFO
 
@@ -36,6 +38,7 @@ Boston, MA 02111-1307, USA.  */
 #include <dbxstclass.h>
 
 #include "xcoffout.h"
+#include "dbxout.h"
 
 #if defined (USG) || !defined (HAVE_STAB_H)
 #include "gstab.h"
diff -rup orig/egcs-CVS19980621/gcc/xcoffout.h egcs-CVS19980621/gcc/xcoffout.h
--- orig/egcs-CVS19980621/gcc/xcoffout.h	Sun Jun 21 08:45:15 1998
+++ egcs-CVS19980621/gcc/xcoffout.h	Sun Jun 21 18:55:06 1998
@@ -166,3 +166,27 @@ extern char *xcoff_lastfile;
    can't find them.  */
 
 #define DEBUG_SYMS_TEXT
+
+/* Prototype functions in xcoffout.c. */
+
+extern int stab_to_sclass			PROTO ((int));
+#ifdef BUFSIZ
+extern void xcoffout_begin_function		PROTO ((FILE *, int));
+extern void xcoffout_begin_block		PROTO ((FILE *, int, int));
+extern void xcoffout_end_epilogue		PROTO ((FILE *));
+extern void xcoffout_end_function		PROTO ((FILE *, int));
+extern void xcoffout_end_block			PROTO ((FILE *, int, int));
+#endif /* BUFSIZ */
+
+#ifdef TREE_CODE
+extern void xcoff_output_standard_types		PROTO ((tree));
+#ifdef BUFSIZ
+extern void xcoffout_declare_function		PROTO ((FILE *, tree, char *));
+#endif /* BUFSIZ */
+#endif /* TREE_CODE */
+
+#ifdef RTX_CODE
+#ifdef BUFSIZ
+extern void xcoffout_source_line		PROTO ((FILE *, char *, rtx));
+#endif /* BUFSIZ */
+#endif /* RTX_CODE */


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