This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]