This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [libgo] Fix __go_append declaration
- From: Ian Lance Taylor <iant at google dot com>
- To: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- Cc: gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Date: Mon, 18 Apr 2011 10:31:13 -0700
- Subject: Re: [libgo] Fix __go_append declaration
- References: <yddfwpfr6oc.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
> An IRIX 6.5 bootstrap over the weekend broke in libgo:
>
> /vol/gcc/src/hg/trunk/local/libgo/runtime/go-append.c:22:1: error: conflicting types for '__go_append'
> /vol/gcc/src/hg/trunk/local/libgo/runtime/go-append.c:18:1: note: previous declaration of '__go_append' was here
> make[4]: *** [go-append.lo] Error 1
>
> The following patch allows the build to continue and seems to be the
> correct fix, given that it matches go/gofrontend/runtime.def:
>
> DEF_GO_RUNTIME(APPEND, "__go_append", P4(SLICE, POINTER, UINTPTR, UINTPTR),
>
> Rainer
>
>
> 2011-04-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
>
> * runtime/go-append.c (__go_append): Change size_t to uintptr_t.
>
> diff --git a/libgo/runtime/go-append.c b/libgo/runtime/go-append.c
> --- a/libgo/runtime/go-append.c
> +++ b/libgo/runtime/go-append.c
> @@ -15,7 +15,7 @@
> this, we will always split the stack, because of memcpy and
> memmove. */
> extern struct __go_open_array
> -__go_append (struct __go_open_array, void *, size_t, size_t)
> +__go_append (struct __go_open_array, void *, uintptr_t, uintptr_t)
> __attribute__ ((no_split_stack));
>
> struct __go_open_array
Thanks.
Committed.
Ian