[tree-ssa] tweak decl_uid printing

Richard Henderson rth@twiddle.net
Mon Nov 17 12:24:00 GMT 2003


One thing about using useful numbers like LABEL_DECL_UID 
and DECL_UID is that one wants to use these numbers in
setting conditional breakpoints.

I, however, have trouble remembering that a number is not
in decimal if it doesn't have an appropriate radix indicator.


r~


        * tree-pretty-print.c (dump_generic_node): Use %u not %x for
        printing DECL_UID.

Index: tree-pretty-print.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-pretty-print.c,v
retrieving revision 1.1.2.60
diff -u -p -r1.1.2.60 tree-pretty-print.c
--- tree-pretty-print.c	16 Nov 2003 17:38:49 -0000	1.1.2.60
+++ tree-pretty-print.c	17 Nov 2003 12:06:31 -0000
@@ -522,14 +522,14 @@ dump_generic_node (pretty_printer *buffe
         pp_printf (buffer, "<L" HOST_WIDE_INT_PRINT_DEC ">",
 		   LABEL_DECL_UID (node));
       else
-        pp_printf (buffer, "<D%x>", DECL_UID (node));
+        pp_printf (buffer, "<D%u>", DECL_UID (node));
       break;
 
     case CONST_DECL:
       if (DECL_NAME (node))
 	pp_string (buffer, IDENTIFIER_POINTER (DECL_NAME (node)));
       else
-        pp_printf (buffer, "<D%x>", DECL_UID (node));
+        pp_printf (buffer, "<D%u>", DECL_UID (node));
       break;
 
     case TYPE_DECL:
@@ -566,7 +566,7 @@ dump_generic_node (pretty_printer *buffe
       if (DECL_NAME (node))
 	pp_string (buffer, IDENTIFIER_POINTER (DECL_NAME (node)));
       else
-        pp_printf (buffer, "<D%x>", DECL_UID (node));
+        pp_printf (buffer, "<D%u>", DECL_UID (node));
       break;
 
     case RESULT_DECL:
@@ -577,14 +577,14 @@ dump_generic_node (pretty_printer *buffe
       if (DECL_NAME (node))
 	pp_string (buffer, IDENTIFIER_POINTER (DECL_NAME (node)));
       else
-	pp_printf (buffer, "<D%x>", DECL_UID (node));
+	pp_printf (buffer, "<D%u>", DECL_UID (node));
       break;
 
     case NAMESPACE_DECL:
       if (DECL_NAME (node))
 	pp_string (buffer, IDENTIFIER_POINTER (DECL_NAME (node)));
       else
-        pp_printf (buffer, "<D%x>", DECL_UID (node));
+        pp_printf (buffer, "<D%u>", DECL_UID (node));
       break;
 
     case COMPONENT_REF:
@@ -661,7 +661,7 @@ dump_generic_node (pretty_printer *buffe
 		if (DECL_NAME (val))
 		  pp_string (buffer, IDENTIFIER_POINTER (DECL_NAME (val)));
 		else
-		  pp_printf (buffer, "<D%x>", DECL_UID (val));
+		  pp_printf (buffer, "<D%u>", DECL_UID (val));
 	      }
 	    else
 	      {



More information about the Gcc-patches mailing list