diff mbox

[libgo] Fix __go_append declaration

Message ID yddfwpfr6oc.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth April 18, 2011, 2:10 p.m. UTC
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.

Comments

Ian Lance Taylor April 18, 2011, 5:31 p.m. UTC | #1
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
diff mbox

Patch

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