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 6/7


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



Sun Jun 21 16:39:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* alpha.c: Include system.h and toplev.h.
	(cint8_operand): Mark parameter `mode' with ATTRIBUTE_UNUSED.
	(const48_operand): Likewise.
	(mode_width_operand): Likewise.
	(mode_mask_operand): Likewise.
	(mul8_operand): Likewise.
	(current_file_function_operand): Likewise.
	(signed_comparison_operator): Likewise.
	(divmod_operator): Likewise.
	(any_memory_operand): Likewise.
	(alpha_return_addr): Likewise for parameter `frame'.
	(alpha_builtin_saveregs): Likewise for parameter `arglist'.
	(vms_valid_decl_attribute_p): Likewise for parameters `decl' and
	`attributes'.
	(output_prologue): Rename to alpha_output_prologue.  Mark
	parameter `size' with ATTRIBUTE_UNUSED.  Use HOST_WIDE_INT_PRINT_DEC
	in call to fprintf.  Fix various format specifiers.  Remove unused
	variables `lab' and `name'.
	(output_end_prologue): Rename to alpha_output_end_prologue.
	(alpha_output_epilogue): Rename to alpha_output_end_epilogue.
	Mark parameter `size' with ATTRIBUTE_UNUSED.
	(check_float_value): Likewise for parameter `overflow'.
	(alpha_need_linkage): Likewise for parameters `name' and `is_local'.
	
	* alpha.h (FUNCTION_PROLOGUE): Define in terms of
	`alpha_output_prologue'.
	(FUNCTION_END_PROLOGUE): Define in terms of
	`alpha_output_end_prologue'.
	(FUNCTION_EPILOGUE): Define in terms of `alpha_output_epilogue'.
	(ASM_IDENTIFY_GCC, ASM_IDENTIFY_LANGUAGE): Define as taking an
	argument.
	(ASM_OUTPUT_SHORT): Use HOST_WIDE_INT_PRINT_DEC in call to fprintf.
	(ASM_OUTPUT_CHAR): Likewise.
	(ASM_OUTPUT_BYTE): Cast argument to `int' in call to fprintf.
	(PRINT_OPERAND_ADDRESS): Use HOST_WIDE_INT_PRINT_DEC in call to
	fprintf.
	(PUT_SDB_EPILOGUE_END): Mention argument `NAME' in definition.
	Add prototypes for functions in alpha.c.

	* alpha.md (ashldi3): Add default case in switch.


diff -rup orig/egcs-CVS19980621/gcc/config/alpha/alpha.c egcs-CVS19980621/gcc/config/alpha/alpha.c
--- orig/egcs-CVS19980621/gcc/config/alpha/alpha.c	Sun Jun 21 08:41:37 1998
+++ egcs-CVS19980621/gcc/config/alpha/alpha.c	Sun Jun 21 16:09:21 1998
@@ -21,8 +21,7 @@ Boston, MA 02111-1307, USA.  */
 
 
 #include "config.h"
-#include <stdio.h>
-#include <ctype.h>
+#include "system.h"
 #include "rtl.h"
 #include "regs.h"
 #include "hard-reg-set.h"
@@ -40,6 +39,7 @@ Boston, MA 02111-1307, USA.  */
 #include "tree.h"
 #include "except.h"
 #include "function.h"
+#include "toplev.h"
 
 /* External data.  */
 extern char *version_string;
@@ -363,7 +363,7 @@ reg_or_8bit_operand (op, mode)
 int
 cint8_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) < 0x100);
@@ -404,7 +404,7 @@ sext_add_operand (op, mode)
 int
 const48_operand (op, mode)
      register rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   return (GET_CODE (op) == CONST_INT
 	  && (INTVAL (op) == 4 || INTVAL (op) == 8));
@@ -449,7 +449,7 @@ or_operand (op, mode)
 int
 mode_width_operand (op, mode)
      register rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   return (GET_CODE (op) == CONST_INT
 	  && (INTVAL (op) == 8 || INTVAL (op) == 16
@@ -462,7 +462,7 @@ mode_width_operand (op, mode)
 int
 mode_mask_operand (op, mode)
      register rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
 #if HOST_BITS_PER_WIDE_INT == 32
   if (GET_CODE (op) == CONST_DOUBLE)
@@ -489,7 +489,7 @@ mode_mask_operand (op, mode)
 int
 mul8_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) < 64
@@ -618,7 +618,7 @@ input_operand (op, mode)
 int
 current_file_function_operand (op, mode)
      rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   return (GET_CODE (op) == SYMBOL_REF
 	  && ! profile_flag && ! profile_block_flag
@@ -680,7 +680,7 @@ alpha_swapped_comparison_operator (op, m
 int
 signed_comparison_operator (op, mode)
      register rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   switch (GET_CODE (op))
     {
@@ -699,7 +699,7 @@ signed_comparison_operator (op, mode)
 int
 divmod_operator (op, mode)
      register rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   switch (GET_CODE (op))
     {
@@ -802,7 +802,7 @@ reg_or_unaligned_mem_operand (op, mode)
 int
 any_memory_operand (op, mode)
      register rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   return (GET_CODE (op) == MEM
 	  || (GET_CODE (op) == SUBREG && GET_CODE (SUBREG_REG (op)) == REG)
@@ -2433,7 +2433,7 @@ alpha_init_expanders ()
 rtx
 alpha_return_addr (count, frame)
      int count;
-     rtx frame;
+     rtx frame ATTRIBUTE_UNUSED;
 {
   rtx init;
 
@@ -2816,7 +2816,7 @@ print_operand (file, x, code)
 
 struct rtx_def *
 alpha_builtin_saveregs (arglist)
-     tree arglist;
+     tree arglist ATTRIBUTE_UNUSED;
 {
   rtx block, addr, dest, argsize;
   tree fntype = TREE_TYPE (current_function_decl);
@@ -3046,8 +3046,8 @@ alpha_using_fp ()
 
 int
 vms_valid_decl_attribute_p (decl, attributes, identifier, args)
-     tree decl;
-     tree attributes;
+     tree decl ATTRIBUTE_UNUSED;
+     tree attributes ATTRIBUTE_UNUSED;
      tree identifier;
      tree args;
 {
@@ -3331,9 +3331,9 @@ alpha_expand_prologue ()
 /* Output the rest of the textual info surrounding the prologue.  */
 
 void
-output_prologue (file, size)
+alpha_output_prologue (file, size)
      FILE *file;
-     HOST_WIDE_INT size;
+     HOST_WIDE_INT size ATTRIBUTE_UNUSED;
 {
   unsigned long imask = 0;
   unsigned long fmask = 0;
@@ -3422,7 +3422,9 @@ output_prologue (file, size)
       fprintf (file, "\t.frame $%d,", vms_unwind_regno);
       fprintf (file, HOST_WIDE_INT_PRINT_DEC,
 	       frame_size >= (1l << 31) ? 0 : frame_size);
-      fprintf (file, ",$26,%d\n", reg_offset);
+      fputs (",$26,", file);
+      fprintf (file, HOST_WIDE_INT_PRINT_DEC, reg_offset);
+      fputs ("\n", file);
     }
   else if (!flag_inhibit_size_directive)
     {
@@ -3440,9 +3442,9 @@ output_prologue (file, size)
       if (imask)
         /* ??? Does VMS care if mask contains ra?  The old code did'nt
            set it, so I don't here.  */
-	fprintf (file, "\t.mask 0x%x,0\n", imask & ~(1L << REG_RA));
+	fprintf (file, "\t.mask 0x%lx,0\n", imask & ~(1L << REG_RA));
       if (fmask)
-	fprintf (file, "\t.fmask 0x%x,0\n", fmask);
+	fprintf (file, "\t.fmask 0x%lx,0\n", fmask);
       if (!vms_is_stack_procedure)
 	fprintf (file, "\t.fp_save $%d\n", vms_save_fp_regno);
     }
@@ -3450,7 +3452,7 @@ output_prologue (file, size)
     {
       if (imask)
 	{
-	  fprintf (file, "\t.mask 0x%x,", imask);
+	  fprintf (file, "\t.mask 0x%lx,", imask);
 	  fprintf (file, HOST_WIDE_INT_PRINT_DEC,
 		   frame_size >= (1l << 31) ? 0 : reg_offset - frame_size);
 	  putc ('\n', file);
@@ -3462,7 +3464,7 @@ output_prologue (file, size)
 
       if (fmask)
 	{
-	  fprintf (file, "\t.fmask 0x%x,", fmask);
+	  fprintf (file, "\t.fmask 0x%lx,", fmask);
 	  fprintf (file, HOST_WIDE_INT_PRINT_DEC,
 		   frame_size >= (1l << 31) ? 0 : reg_offset - frame_size);
 	  putc ('\n', file);
@@ -3474,9 +3476,6 @@ output_prologue (file, size)
      plain text.  */
   if (!TARGET_OPEN_VMS && !TARGET_WINDOWS_NT)
     {
-      rtx lab;
-      char *name;
-
       alpha_function_needs_gp = alpha_does_function_need_gp ();
       if (alpha_function_needs_gp)
 	fputs ("\tldgp $29,0($27)\n", file);
@@ -3513,7 +3512,7 @@ output_prologue (file, size)
 /* Emit the .prologue note at the scheduled end of the prologue.  */
 
 void
-output_end_prologue (file)
+alpha_output_end_prologue (file)
      FILE *file;
 {
   if (TARGET_OPEN_VMS)
@@ -3709,9 +3708,9 @@ alpha_expand_epilogue ()
 /* Output the rest of the textual info surrounding the epilogue.  */
 
 void
-output_epilogue (file, size)
+alpha_output_epilogue (file, size)
      FILE *file;
-     int size;
+     int size ATTRIBUTE_UNUSED;
 {
   /* End the function.  */
   if (!flag_inhibit_size_directive)
@@ -4167,7 +4166,7 @@ int
 check_float_value (mode, d, overflow)
      enum machine_mode mode;
      REAL_VALUE_TYPE *d;
-     int overflow;
+     int overflow ATTRIBUTE_UNUSED;
 {
 
   if (TARGET_IEEE || TARGET_IEEE_CONFORMANT || TARGET_IEEE_WITH_INEXACT)
@@ -4357,8 +4356,8 @@ alpha_write_linkage (stream)
 
 void
 alpha_need_linkage (name, is_local)
-     char *name;
-     int is_local;
+     char *name ATTRIBUTE_UNUSED;
+     int is_local ATTRIBUTE_UNUSED;
 {
 }
 
diff -rup orig/egcs-CVS19980621/gcc/config/alpha/alpha.h egcs-CVS19980621/gcc/config/alpha/alpha.h
--- orig/egcs-CVS19980621/gcc/config/alpha/alpha.h	Sun Jun 21 08:41:37 1998
+++ egcs-CVS19980621/gcc/config/alpha/alpha.h	Sun Jun 21 15:53:21 1998
@@ -1116,11 +1116,11 @@ extern char *alpha_function_name;
    is ever used in the function.  This macro is responsible for
    knowing which registers should not be saved even if used.  */
 
-#define FUNCTION_PROLOGUE(FILE, SIZE)  output_prologue (FILE, SIZE)
+#define FUNCTION_PROLOGUE(FILE, SIZE)  alpha_output_prologue (FILE, SIZE)
 
 /* This macro notes the end of the prologue.  */
 
-#define FUNCTION_END_PROLOGUE(FILE)  output_end_prologue (FILE)
+#define FUNCTION_END_PROLOGUE(FILE)  alpha_output_end_prologue (FILE)
 
 /* Output assembler code to FILE to increment profiler label # LABELNO
    for profiling a function entry.  Under OSF/1, profiling is enabled
@@ -1181,7 +1181,7 @@ extern char *alpha_function_name;
    of alloca; we also take advantage of it to omit stack adjustments
    before returning.  */
 
-#define FUNCTION_EPILOGUE(FILE, SIZE)	output_epilogue (FILE, SIZE)
+#define FUNCTION_EPILOGUE(FILE, SIZE)	alpha_output_epilogue (FILE, SIZE)
 
 
 /* Output assembler code for a block containing the constant parts
@@ -1821,8 +1821,8 @@ do {									\
    sized text section with no associated exception handling info.  The
    DEC linker sees this text section, and gives a warning saying that
    the exception handling info is missing.  */
-#define ASM_IDENTIFY_GCC
-#define ASM_IDENTIFY_LANGUAGE
+#define ASM_IDENTIFY_GCC(x)
+#define ASM_IDENTIFY_LANGUAGE(x)
 
 /* Output to assembler file text saying following lines
    may contain character constants, extra white space, comments, etc.  */
@@ -1988,14 +1988,23 @@ literal_section ()						\
 /* Likewise for `char' and `short' constants.  */
 
 #define ASM_OUTPUT_SHORT(FILE,VALUE)  \
-  fprintf (FILE, "\t.word %d\n",		\
-    (GET_CODE (VALUE) == CONST_INT		\
-     ? INTVAL (VALUE) & 0xffff : (abort (), 0)))
+  do {						\
+    fputs ("\t.word ", FILE);			\
+    fprintf (FILE, HOST_WIDE_INT_PRINT_DEC,	\
+      (GET_CODE (VALUE) == CONST_INT		\
+       ? INTVAL (VALUE) & 0xffff : (abort (), 0)));\
+    fputs ("\n", FILE);				\
+  } while (0)
+
 
 #define ASM_OUTPUT_CHAR(FILE,VALUE)		\
-  fprintf (FILE, "\t.byte %d\n",		\
-    (GET_CODE (VALUE) == CONST_INT		\
-     ? INTVAL (VALUE) & 0xff : (abort (), 0)))
+  do {						\
+    fputs ("\t.byte ", FILE);			\
+    fprintf (FILE, HOST_WIDE_INT_PRINT_DEC,	\
+      (GET_CODE (VALUE) == CONST_INT		\
+       ? INTVAL (VALUE) & 0xff : (abort (), 0)));\
+    fputs ("\n", FILE);				\
+  } while (0)
 
 /* We use the default ASCII-output routine, except that we don't write more
    than 50 characters since the assembler doesn't support very long lines.  */
@@ -2061,7 +2070,7 @@ literal_section ()						\
 /* This is how to output an assembler line for a numeric constant byte.  */
 
 #define ASM_OUTPUT_BYTE(FILE,VALUE)  \
-  fprintf (FILE, "\t.byte 0x%x\n", (VALUE) & 0xff)
+  fprintf (FILE, "\t.byte 0x%x\n", (int) ((VALUE) & 0xff))
 
 /* This is how to output an element of a case-vector that is absolute.
    (Alpha does not use such vectors, but we must define this macro anyway.)  */
@@ -2232,7 +2241,8 @@ do {									\
   else							\
     abort ();						\
 							\
-  fprintf (FILE, "%d($%d)", offset, basereg);		\
+  fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, offset);		\
+  fprintf (FILE, "($%d)", basereg);		\
 }
 /* Define the codes that are matched by predicates in alpha.c.  */
 
@@ -2392,7 +2402,7 @@ do {							\
 
 #define PUT_SDB_FUNCTION_END(LINE)
 
-#define PUT_SDB_EPILOGUE_END(NAME)
+#define PUT_SDB_EPILOGUE_END(NAME) ((void)(NAME))
 
 /* Macros for mips-tfile.c to encapsulate stabs in ECOFF, and for
    mips-tdump.c to print them out.
@@ -2422,5 +2432,50 @@ do {							\
 /* The system headers under Alpha systems are generally C++-aware.  */
 #define NO_IMPLICIT_EXTERN_C
 
-/* Prototypes for alpha.c functions used in the md file.  */
+/* Prototypes for alpha.c functions used in the md file & elsewhere.  */
 extern struct rtx_def *get_unaligned_address ();
+extern void alpha_write_verstamp ();
+extern void alpha_reorg ();
+extern int check_float_value ();
+extern int direct_return ();
+extern int const48_operand ();
+extern int add_operand ();
+extern int and_operand ();
+extern int unaligned_memory_operand ();
+extern int zap_mask ();
+extern int current_file_function_operand ();
+extern int alpha_sa_size ();
+extern int alpha_adjust_cost ();
+extern void alpha_output_prologue ();
+extern void alpha_output_end_prologue ();
+extern void alpha_output_epilogue ();
+extern void print_operand ();
+extern int reg_or_0_operand ();
+extern int reg_or_8bit_operand ();
+extern int mul8_operand ();
+extern int reg_or_6bit_operand ();
+extern int alpha_comparison_operator ();
+extern int alpha_swapped_comparison_operator ();
+extern int sext_add_operand ();
+extern int cint8_operand ();
+extern int mode_mask_operand ();
+extern int or_operand ();
+extern int mode_width_operand ();
+extern int reg_or_fp0_operand ();
+extern int signed_comparison_operator ();
+extern int fp0_operand ();
+extern int some_operand ();
+extern int input_operand ();
+extern int divmod_operator ();
+extern int call_operand ();
+extern int reg_or_cint_operand ();
+extern int hard_fp_register_operand ();
+extern void alpha_set_memflags ();
+extern int aligned_memory_operand ();
+extern void get_aligned_mem ();
+extern void alpha_expand_unaligned_load ();
+extern void alpha_expand_unaligned_store ();
+extern int alpha_expand_block_move ();
+extern int alpha_expand_block_clear ();
+extern void alpha_expand_prologue ();
+extern void alpha_expand_epilogue ();
diff -rup orig/egcs-CVS19980621/gcc/config/alpha/alpha.md egcs-CVS19980621/gcc/config/alpha/alpha.md
--- orig/egcs-CVS19980621/gcc/config/alpha/alpha.md	Sun Jun 21 08:41:38 1998
+++ egcs-CVS19980621/gcc/config/alpha/alpha.md	Sun Jun 21 12:41:38 1998
@@ -1190,6 +1190,8 @@
 	return \"s%P2addq %r1,0,%0\";
     case 1:
       return \"sll %r1,%2,%0\";
+    default:
+      abort();
     }
 }"
   [(set_attr "type" "iadd,shift")])


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