diff mbox

[gccgo] Fix -fdump-go-specs for anonymous struct fields

Message ID mcrmxpah4mp.fsf@google.com
State New
Headers show

Commit Message

Ian Lance Taylor Nov. 15, 2010, 5:35 p.m. UTC
When converting -ggo to -fdump-go-specs, I made a mistake in the spacing
for anonymous struct fields.  This patch fixes the mistake by always
inserting a space after the name of the field.  Committed to gccgo
branch.

Ian
diff mbox

Patch

Index: gcc/godump.c
===================================================================
--- gcc/godump.c	(revision 166761)
+++ gcc/godump.c	(working copy)
@@ -509,8 +509,8 @@  go_format_type (struct godump_container 
 		if (slot != NULL)
 		  obstack_1grow (ob, '_');
 		go_append_string (ob, DECL_NAME (field));
-		obstack_1grow (ob, ' ');
 	      }
+	    obstack_1grow (ob, ' ');
 	    if (DECL_BIT_FIELD (field))
 	      {
 		obstack_grow (ob, "INVALID-bit-field", 17);