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

login
register
mail settings
Submitter Ian Taylor
Date Nov. 15, 2010, 5:35 p.m.
Message ID <mcrmxpah4mp.fsf@google.com>
Download mbox | patch
Permalink /patch/71258/
State New
Headers show

Comments

Ian Taylor - Nov. 15, 2010, 5:35 p.m.
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

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);