aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/go-reflect-call.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2019-02-15 01:57:51 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-02-15 01:57:51 +0000
commit8a9f2a6bbd6bdf164ca987edac34ac72447881a5 (patch)
tree0722c462bd08d8478a0d1861b10b9f966193505e /libgo/runtime/go-reflect-call.c
parentc8530c410972f09b88bb143e5e5a4910bd72b2ee (diff)
downloadgcc-8a9f2a6bbd6bdf164ca987edac34ac72447881a5.zip
gcc-8a9f2a6bbd6bdf164ca987edac34ac72447881a5.tar.gz
gcc-8a9f2a6bbd6bdf164ca987edac34ac72447881a5.tar.bz2
compiler, runtime: harmonize types referenced by both C and Go
Compiling with LTO revealed a number of cases in the runtime and standard library where C and Go disagreed about the type of an object or function (or where Go and code generated by the compiler disagreed). In all cases the underlying representation was the same (e.g., uintptr vs. void*), so this wasn't causing actual problems, but it did result in a number of annoying warnings when compiling with LTO. Reviewed-on: https://go-review.googlesource.com/c/160700 From-SVN: r268923
Diffstat (limited to 'libgo/runtime/go-reflect-call.c')
-rw-r--r--libgo/runtime/go-reflect-call.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgo/runtime/go-reflect-call.c b/libgo/runtime/go-reflect-call.c
index 6a9a7f3..abd598b 100644
--- a/libgo/runtime/go-reflect-call.c
+++ b/libgo/runtime/go-reflect-call.c
@@ -229,7 +229,8 @@ reflect_call (const struct __go_func_type *func_type, FuncVal *func_val,
call_result = (unsigned char *) malloc (go_results_size (func_type));
- ffi_call_go (&cif, func_val->fn, call_result, params, func_val);
+ ffi_call_go (&cif, (void (*)(void)) func_val->fn, call_result, params,
+ func_val);
/* Some day we may need to free result values if RESULTS is
NULL. */