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]
Other format: [Raw text]

[patch] h8300: Fix warnings.


Hi,

Attached is a patch to fix warnings.

Tested on h8300 port.  Committed.

Kazu Hirata

2003-01-30  Kazu Hirata  <kazu@cs.umass.edu>

	* config/h8300/h8300-protos.h: Update the prototype for
	compute_plussi_cc.
	(cpp_reader): Declare before it is used.
	* config/h8300/h8300.c (compute_plussi_cc): Change the return
	type to int.
	* config/h8300/h8300.md (monitor_prologue): Call abort() if we
	see an unknown H8 variant.

Index: h8300-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300-protos.h,v
retrieving revision 1.47
diff -u -r1.47 h8300-protos.h
--- h8300-protos.h	28 Jan 2003 04:46:25 -0000	1.47
+++ h8300-protos.h	30 Jan 2003 14:26:05 -0000
@@ -28,7 +28,7 @@
 #ifdef RTX_CODE
 extern const char *output_plussi PARAMS ((rtx *));
 extern unsigned int compute_plussi_length PARAMS ((rtx *));
-extern enum attr_cc compute_plussi_cc PARAMS ((rtx *));
+extern int compute_plussi_cc PARAMS ((rtx *));
 extern const char *output_a_shift PARAMS ((rtx *));
 extern unsigned int compute_a_shift_length PARAMS ((rtx, rtx *));
 extern const char *emit_a_rotate PARAMS ((enum rtx_code, rtx *));
@@ -95,6 +95,7 @@
 extern void asm_file_end PARAMS ((FILE *));
 extern int h8300_initial_elimination_offset PARAMS ((int, int));
 
+struct cpp_reader;
 extern void h8300_pr_interrupt PARAMS ((struct cpp_reader *));
 extern void h8300_pr_saveall PARAMS ((struct cpp_reader *));
 
Index: h8300.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.c,v
retrieving revision 1.209
diff -u -r1.209 h8300.c
--- h8300.c	28 Jan 2003 04:46:25 -0000	1.209
+++ h8300.c	30 Jan 2003 14:26:06 -0000
@@ -2082,7 +2082,7 @@
     }
 }
 
-enum attr_cc
+int
 compute_plussi_cc (operands)
      rtx *operands;
 {
Index: h8300.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.md,v
retrieving revision 1.155
diff -u -r1.155 h8300.md
--- h8300.md	24 Jan 2003 16:03:14 -0000	1.155
+++ h8300.md	30 Jan 2003 14:26:07 -0000
@@ -1963,6 +1963,7 @@
     return \"mov.l\\ter0,@-er7\;stc\\tccr,r0l\;mov.b\\tr0l,@(4,er7)\;mov.l\\t@er7+,er0\;orc\\t#128,ccr\";
   else if (TARGET_H8300S)
     return \"stc\texr,@-er7\;mov.l\\ter0,@-er7\;stc\tccr,r0l\;mov.b\tr0l,@(6,er7)\;mov.l\\t@er7+,er0\;orc\t#128,ccr\";
+    abort ();
 }"
   [(set_attr "length" "20")
    (set_attr "cc" "clobber")])


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