diff mbox

Use static chain and libffi for Go closures

Message ID 54BD80B1.9020900@redhat.com
State New
Headers show

Commit Message

Richard Henderson Jan. 19, 2015, 10:09 p.m. UTC
On 01/19/2015 02:26 AM, Andreas Schwab wrote:
> Ian Lance Taylor <iant@golang.org> writes:
> 
>> @@ -83,7 +83,7 @@
>>  #else /* !defined(USE_LIBFFI_CLOSURES) */
>>  
>>  void
>> -makeFuncFFI(const struct __go_func_type *ftyp, ffi_go_closure *impl)
>> +makeFuncFFI(const struct __go_func_type *ftyp, void *impl)
>>  {
>>    runtime_panicstring ("libgo built without FFI does not support "
>>  		       "reflect.MakeFunc");
> 
> ../../../libgo/go/reflect/makefunc_ffi_c.c: In function ‘makeFuncFFI’:
> ../../../libgo/go/reflect/makefunc_ffi_c.c:86:42: error: unused parameter ‘ftyp’ [-Werror=unused-parameter]
>  makeFuncFFI(const struct __go_func_type *ftyp, void *impl)
>                                           ^
> ../../../libgo/go/reflect/makefunc_ffi_c.c:86:54: error: unused parameter ‘impl’ [-Werror=unused-parameter]
>  makeFuncFFI(const struct __go_func_type *ftyp, void *impl)

Fixed thus; applying to mainline after build testing a cross tomips64el-linux.

Ian, I assume you'll push this upstream?


r~

Comments

Ian Lance Taylor Jan. 20, 2015, 4:03 a.m. UTC | #1
On Mon, Jan 19, 2015 at 2:09 PM, Richard Henderson <rth@redhat.com> wrote:
>
> Fixed thus; applying to mainline after build testing a cross tomips64el-linux.
>
> Ian, I assume you'll push this upstream?

Committed.

(It's a little easier for me if I submit patches to the libgo and
gcc/go/gofrontend directories.)

Ian
diff mbox

Patch

diff --git a/libgo/go/reflect/makefunc_ffi_c.c b/libgo/go/reflect/makefunc_ffi_c.c
index 2a98e9b..06a41ef 100644
--- a/libgo/go/reflect/makefunc_ffi_c.c
+++ b/libgo/go/reflect/makefunc_ffi_c.c
@@ -83,7 +83,8 @@  makeFuncFFI(const struct __go_func_type *ftyp, void *impl)
 #else /* !defined(USE_LIBFFI_CLOSURES) */
 
 void
-makeFuncFFI(const struct __go_func_type *ftyp, void *impl)
+makeFuncFFI(const struct __go_func_type *ftyp __attribute__ ((unused)),
+	    void *impl __attribute__ ((unused)))
 {
   runtime_panicstring ("libgo built without FFI does not support "
 		       "reflect.MakeFunc");