OSDN Git Service

* error.c (dump_expr): Add 0x to printed hex numbers to make
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 28 Mar 2003 23:48:17 +0000 (23:48 +0000)
committermrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 28 Mar 2003 23:48:17 +0000 (23:48 +0000)
        output match source code better.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64997 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/error.c

index efced90..2dc2bb7 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-28  Mike Stump  <mrs@apple.com>
+
+       * error.c (dump_expr): Add 0x to printed hex numbers to make
+       output match source code better.
+
 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/10218
index a19374a..f836ecc 100644 (file)
@@ -1474,9 +1474,9 @@ dump_expr (tree t, int flags)
                /* Would "%x%0*x" or "%x%*0x" get zero-padding on all
                   systems?  */
                {
-                 static char format[10]; /* "%x%09999x\0" */
+                 static char format[12]; /* "0x%x%09999x\0" */
                  if (!format[0])
-                   sprintf (format, "%%x%%0%dx", HOST_BITS_PER_INT / 4);
+                   sprintf (format, "0x%%x%%0%dx", HOST_BITS_PER_INT / 4);
                  sprintf (digit_buffer, format, TREE_INT_CST_HIGH (val),
                           TREE_INT_CST_LOW (val));
                  output_add_string (scratch_buffer, digit_buffer);