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]

RFA: Avoid -Werror bootstrap failure with BUILD_CC=gcc-2.95


GCC 2.95 warns here; GCC 3.4 is smarter.  OK?

Neil.

	* genautomata.c (output_internal_insn_latency_func): Cast to
	avoid signed / unsigned comparison warnings with older GCCs.

Index: genautomata.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/genautomata.c,v
retrieving revision 1.41
diff -u -p -r1.41 genautomata.c
--- genautomata.c	29 Apr 2003 22:46:54 -0000	1.41
+++ genautomata.c	11 May 2003 13:26:27 -0000
@@ -8940,10 +8940,10 @@ output_internal_insn_latency_func ()
     if (description->decls[i]->mode == dm_insn_reserv)
       {
 	decl = description->decls[i];
-	if (DECL_INSN_RESERV (decl)->default_latency > UCHAR_MAX
+	if (DECL_INSN_RESERV (decl)->default_latency > (int) UCHAR_MAX
 	    && tabletype[0] != 'i')  /* don't shrink it */
 	  tabletype = "unsigned short";
-	if (DECL_INSN_RESERV (decl)->default_latency > USHRT_MAX)
+	if (DECL_INSN_RESERV (decl)->default_latency > (int) USHRT_MAX)
 	  tabletype = "int";
       }
     


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