Patchwork PATCH RFA: Ping for -fdump-go-spec

login
register
mail settings
Submitter Ralf Wildenhues
Date Nov. 13, 2010, 1:18 a.m.
Message ID <20101113011810.GA21395@gmx.de>
Download mbox | patch
Permalink /patch/71034/
State New
Headers show

Comments

Ralf Wildenhues - Nov. 13, 2010, 1:18 a.m.
* Ian Lance Taylor wrote on Fri, Nov 12, 2010 at 10:51:33PM CET:
> This is a ping for the patch which adds the -fdump-go-spec option.  For
> clarity, I have included the complete patch here.  I originally proposed
> this patch, under the name -ggo, here:
> 
> http://gcc.gnu.org/ml/gcc-patches/2010-11/msg00369.html

> * Does anybody have any objections to this patch?

The gccgo branch has at least one regression introduced AFAICS by the
GOC patch, that is shared by this patch, and fixed with the one-liner
below.  The effect is a build failure on x86_64-unknown-linux-gnu
compiling syscalls.go:

sysinfo.go:1897:120: error: expected type
sysinfo.go:1897:120: error: expected ‘;’ or ‘}’ or newline
sysinfo.go:1897:140: error: expected declaration
Makefile:4557: recipe for target `syscalls/libsyscall.a' failed

which complains about this line:

type ___pthread_mutex_s struct { __lock int32; __count uint32; __owner int32; __kind int32; __nusers uint32; _f0struct { __spins int32; }; }

Cheers,
Ralf

	* gcc/godump.c (go_format_type): Insert space after name for
	anonymous field in struct again.
Ian Taylor - Nov. 13, 2010, 1:26 a.m.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:

> * Ian Lance Taylor wrote on Fri, Nov 12, 2010 at 10:51:33PM CET:
>> This is a ping for the patch which adds the -fdump-go-spec option.  For
>> clarity, I have included the complete patch here.  I originally proposed
>> this patch, under the name -ggo, here:
>> 
>> http://gcc.gnu.org/ml/gcc-patches/2010-11/msg00369.html
>
>> * Does anybody have any objections to this patch?
>
> The gccgo branch has at least one regression introduced AFAICS by the
> GOC patch, that is shared by this patch, and fixed with the one-liner
> below.

Thanks for trying it.  I have as it happens already fixed that in my own
copy of godump.c, and the fix will be included in the commit.

Ian

Patch

diff --git a/gcc/godump.c b/gcc/godump.c
index 0836e3c..f9cfffc 100644
--- a/gcc/godump.c
+++ b/gcc/godump.c
@@ -495,6 +495,7 @@  go_format_type (struct godump_container *container, tree type,
 		obstack_grow (ob, "_f", 2);
 		snprintf (buf, sizeof buf, "%d", i);
 		obstack_grow (ob, buf, strlen (buf));
+		obstack_grow (ob, " ", 1);
 		i++;
 	      }
 	    else