This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC PATCH, go]: Port to ALPHA arch - sysinfo.go fixup
- From: Ian Lance Taylor <iant at google dot com>
- To: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Date: Thu, 21 Apr 2011 16:39:37 -0700
- Subject: Re: [RFC PATCH, go]: Port to ALPHA arch - sysinfo.go fixup
- References: <AANLkTimxnJT+r0zh_Lyc7hOdXW1OUk4c0X8cM-61k=ix@mail.gmail.com> <yddoc4roghx.fsf@manam.CeBiTec.Uni-Bielefeld.DE> <mcraag9lfya.fsf@google.com> <yddd3kxg9ek.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
> Here's the error I run into:
>
> /vol/gcc/src/hg/trunk/irix/libgo/go/os/file.go:432:12: error: incompatible types in assignment (implicit assignment of 'syscall.Timeval' hidden field '_f0')
> /vol/gcc/src/hg/trunk/irix/libgo/go/os/file.go:433:12: error: incompatible types in assignment (implicit assignment of 'syscall.Timeval' hidden field '_f0')
> /vol/gcc/src/hg/trunk/irix/libgo/go/os/file.go:434:37: error: argument 2 has incompatible type (implicit assignment of 'syscall.Timeval' hidden field '_f0')
> make[8]: *** [os/os.lo] Error 1
>
>> What does the line for timeval look like in gen-sysinfo.go?
>
> I get
>
> type Timeval struct { _f0 int32; Sec Timeval_sec_t; Usec Timeval_usec_t; }
Thanks. I fixed this problem with this patch. Bootstrapped and ran Go
testsuite on x86_64-unknown-linux-gnu. Committed to mainline.
Ian
2011-04-21 Ian Lance Taylor <iant@google.com>
* godump.c (go_format_type): Use exported Go name for anonymous
field name.
Index: gcc/godump.c
===================================================================
--- gcc/godump.c (revision 172331)
+++ gcc/godump.c (working copy)
@@ -675,7 +675,7 @@ go_format_type (struct godump_container
{
char buf[100];
- obstack_grow (ob, "_f", 2);
+ obstack_grow (ob, "Godump_", 2);
snprintf (buf, sizeof buf, "%d", i);
obstack_grow (ob, buf, strlen (buf));
i++;