[tuples] Some gimple printing fixes

Jakub Jelinek jakub@redhat.com
Fri Jul 18 13:09:00 GMT 2008


Hi!

Several statements with C equivalents weren't terminated with semicolon,
furthermore IMHO printing GIMPLE_GOTO as gimple_goto rather than just
plain goto is completely unnecessary.

Bootstrapped/regtested on x86_64-linux, will commit RSN.

2008-07-18  Jakub Jelinek  <jakub@redhat.com>

	* gimple-pretty-print.c (dump_gimple_cond): Print a semicolon if
	goto or else goto has been printed.
	(dump_gimple_goto): Print as goto instead of gimple_goto, print
	a semicolon at the end.
	(dump_gimple_asm): Print a semicolon at the end.

--- gcc/gimple-pretty-print.c.jj	2008-07-17 18:03:15.000000000 +0200
+++ gcc/gimple-pretty-print.c	2008-07-18 10:53:38.000000000 +0200
@@ -571,6 +571,9 @@ dump_gimple_cond (pretty_printer *buffer
 	      dump_generic_node (buffer, gimple_cond_false_label (gs),
 				 spc, flags, false);
 	    }
+          if (gimple_cond_true_label (gs)
+	      || gimple_cond_false_label (gs))
+	    pp_semicolon (buffer);
 	}
     }
 }
@@ -604,7 +607,7 @@ dump_gimple_goto (pretty_printer *buffer
   if (flags & TDF_RAW)
     dump_gimple_fmt (buffer, spc, flags, "%G <%T>", gs, label);
   else
-    dump_gimple_fmt (buffer, spc, flags, "%G %T", gs, label);
+    dump_gimple_fmt (buffer, spc, flags, "goto %T;", label);
 }
 
 
@@ -1093,7 +1096,7 @@ dump_gimple_asm (pretty_printer *buffer,
       pp_character (buffer, '>');
     }
   else
-    pp_character (buffer, ')');
+    pp_string (buffer, ");");
 }
 
 

	Jakub



More information about the Gcc-patches mailing list