[llvm] r257927 - [Orc] Add a void cast to work around a GCC diagnostic bug.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 15 11:37:15 PST 2016
Author: lhames
Date: Fri Jan 15 13:37:14 2016
New Revision: 257927
URL: http://llvm.org/viewvc/llvm-project?rev=257927&view=rev
Log:
[Orc] Add a void cast to work around a GCC diagnostic bug.
Modified:
llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h?rev=257927&r1=257926&r2=257927&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h Fri Jan 15 13:37:14 2016
@@ -63,6 +63,10 @@ protected:
static std::error_code readAndHandle(ChannelT &C, HandlerT Handler,
llvm::index_sequence<Is...> _) {
std::tuple<ArgTs...> RPCArgs;
+ // GCC 4.7 and 4.8 incorrectly issue a -Wunused-but-set-variable warning
+ // for RPCArgs. Void cast RPCArgs to work around this for now.
+ // FIXME: Remove this workaround once we can assume a working GCC version.
+ (void)RPCArgs;
if (auto EC = deserialize_seq(C, std::get<Is>(RPCArgs)...))
return EC;
return Handler(std::get<Is>(RPCArgs)...);
More information about the llvm-commits
mailing list