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 for diagnostics format warnings in gcc dir


This patch fixes a couple of diagnostics format warnings in the top
level gcc directory.

The first bit was needed because the '#' flag isn't supported by the C
frontend diagnostics format, and c-semantics.c is linked with cc1.

The second bit was a simple HOST_WIDE_INT mismatch, fixed with the new
'w' length modifier.

Bootstrapped on sparc-sun-solaris2.7 (minus java), no regressions.

Ok for mainline?

		Thanks!
		--Kaveh


2003-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* c-semantics.c (genrtl_case_label): Fix format specifier bug.
	* cfgrtl.c (rtl_verify_flow_info_1): Likewise.

diff -rup orig/egcc-CVS20030628/gcc/c-semantics.c egcc-CVS20030628/gcc/c-semantics.c
--- orig/egcc-CVS20030628/gcc/c-semantics.c	2003-06-27 20:01:35.000000000 -0400
+++ egcc-CVS20030628/gcc/c-semantics.c	2003-06-29 00:02:39.129019247 -0400
@@ -697,7 +697,7 @@ genrtl_case_label (tree case_label)
   if (cleanup)
     {
       static int explained = 0;
-      warning ("destructor needed for `%#D'", (TREE_PURPOSE (cleanup)));
+      warning ("destructor needed for `%D'", (TREE_PURPOSE (cleanup)));
       warning ("where case label appears here");
       if (!explained)
 	{
diff -rup orig/egcc-CVS20030628/gcc/cfgrtl.c egcc-CVS20030628/gcc/cfgrtl.c
--- orig/egcc-CVS20030628/gcc/cfgrtl.c	2003-06-28 20:01:02.000000000 -0400
+++ egcc-CVS20030628/gcc/cfgrtl.c	2003-06-29 00:03:39.053647354 -0400
@@ -1833,7 +1833,7 @@ rtl_verify_flow_info_1 (void)
 	{
 	  if (INTVAL (XEXP (note, 0)) != BRANCH_EDGE (bb)->probability)
 	    {
-	      error ("verify_flow_info: REG_BR_PROB does not match cfg %i %i",
+	      error ("verify_flow_info: REG_BR_PROB does not match cfg %wi %i",
 		     INTVAL (XEXP (note, 0)), BRANCH_EDGE (bb)->probability);
 	      err = 1;
 	    }


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