This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tuples] [patch] make gimple-pretty-print closer to tree-pretty-print
- From: Diego Novillo <dnovillo at google dot com>
- To: Rafael Espindola <espindola at google dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 29 Apr 2008 10:33:06 -0400
- Subject: Re: [tuples] [patch] make gimple-pretty-print closer to tree-pretty-print
- References: <38a0d8450804290722w67bb683cv2fe4c388f2de5776@mail.gmail.com>
On 4/29/08 10:22 AM, Rafael Espindola wrote:
The attached patch reduces the number or arbitrary differences in the
dumps from trunk and tuples.
I typically use something like this on my trunk tree. It may be worth
adding this to trunk, but it's not terribly important.
Diego.
Index: tree-pretty-print.c
===================================================================
--- tree-pretty-print.c (revision 134692)
+++ tree-pretty-print.c (working copy)
@@ -1653,10 +1653,9 @@ dump_generic_node (pretty_printer *buffe
pp_string (buffer, " goto ");
dump_generic_node (buffer, CASE_LABEL (elt), spc+4,
flags, true);
- pp_semicolon (buffer);
}
else
- pp_string (buffer, "case ???: goto ???;");
+ pp_string (buffer, "case ???: goto ???");
}
}
newline_and_indent (buffer, spc+2);
@@ -2178,9 +2177,6 @@ dump_generic_node (pretty_printer *buffe
NIY;
}
- if (is_stmt && is_expr)
- pp_semicolon (buffer);
-
/* If we're building a diagnostic, the formatted text will be written
into BUFFER's stream by the caller; otherwise, write it now. */
if (!(flags & TDF_DIAGNOSTIC))
@@ -2276,8 +2272,6 @@ print_declaration (pretty_printer *buffe
dump_generic_node (buffer, DECL_VALUE_EXPR (t), spc, flags, false);
pp_character (buffer, ']');
}
-
- pp_character (buffer, ';');
}
@@ -3079,7 +3073,6 @@ pp_cfg_jump (pretty_printer *buffer, bas
dump_generic_node (buffer, LABEL_EXPR_LABEL (stmt), 0, 0, false);
pp_string (buffer, ")");
}
- pp_semicolon (buffer);
}
/* Dump edges represented implicitly in basic block BB to BUFFER, indented