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]

Re: C++ PATCH: PR 8615


 > From: Mark Mitchell <mark@codesourcery.com>
 > 
 > Since a char is never bigger than an unsigned int, should we just do:
 > 
 >       output_printf (scratch_buffer, "\\x%x",
 > 	             (unsigned int) TREE_INT_CST_LOW (t));

Certainly.  Ok to install?


2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* error.c (dump_expr): Fix format specifier warning.

diff -rup orig/egcc-3.2-CVS20021204/gcc/cp/error.c egcc-3.2-CVS20021204/gcc/cp/error.c
--- orig/egcc-3.2-CVS20021204/gcc/cp/error.c	Wed Dec  4 07:19:34 2002
+++ egcc-3.2-CVS20021204/gcc/cp/error.c	Thu Dec  5 12:52:14 2002
@@ -1479,7 +1479,8 @@ dump_expr (t, flags)
 	    if (host_integerp (t, TREE_UNSIGNED (type)))
 	      dump_char (tree_low_cst (t, TREE_UNSIGNED (type)));
 	    else
-	      output_printf (scratch_buffer, "\\x%x", TREE_INT_CST_LOW (t));
+	      output_printf (scratch_buffer, "\\x%x",
+			     (unsigned int) TREE_INT_CST_LOW (t));
 	    output_add_character (scratch_buffer, '\'');
 	  }
 	else


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