diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp index b8a33f74bd570..5503f7343cb67 100644 --- a/llvm/tools/gold/gold-plugin.cpp +++ b/llvm/tools/gold/gold-plugin.cpp @@ -434,8 +434,10 @@ ld_plugin_status onload(ld_plugin_tv *tv) { // FIXME: When binutils 2.31 (containing gold 1.16) is the minimum // required version, this should be changed to: // get_wrap_symbols = tv->tv_u.tv_get_wrap_symbols; - get_wrap_symbols = - (ld_plugin_get_wrap_symbols)tv->tv_u.tv_message; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-function-type" + get_wrap_symbols = (ld_plugin_get_wrap_symbols)tv->tv_u.tv_message; +#pragma GCC diagnostic pop break; default: break;