Use static chain and libffi for Go closures
Richard Henderson
rth@redhat.com
Mon Jan 19 22:54:00 GMT 2015
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~
-------------- next part --------------
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");
More information about the Gcc-patches
mailing list