This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gccgo] Fix -fdump-go-specs for anonymous struct fields
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Date: Mon, 15 Nov 2010 09:35:10 -0800
- Subject: [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);