Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: src/PNaClTranslator.cpp

Issue 1575873006: Subzero: Fix g++ warnings. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/IceUtils.h ('K') | « src/IceUtils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/PNaClTranslator.cpp
diff --git a/src/PNaClTranslator.cpp b/src/PNaClTranslator.cpp
index ddf6342e32b9fd50a8da74a43dda925c88d80d92..a7b367c507774d04148cf155270e320e5c3682da 100644
--- a/src/PNaClTranslator.cpp
+++ b/src/PNaClTranslator.cpp
@@ -23,8 +23,11 @@
#include "IceInst.h"
#include "IceOperand.h"
+#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
+#endif // __clang__
+
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Bitcode/NaCl/NaClBitcodeDecoders.h"
@@ -35,8 +38,12 @@
#include "llvm/Support/Format.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
-#include <unordered_set>
+
+#ifdef __clang__
#pragma clang diagnostic pop
+#endif // __clang__
+
+#include <unordered_set>
// Define a hash function for SmallString's, so that it can be used in hash
// tables.
@@ -190,7 +197,7 @@ public:
"IntType and FpType should be the same width");
assert(BitWidth == sizeof(IntType) * CHAR_BIT);
auto V = static_cast<IntType>(Val);
- return reinterpret_cast<FpType &>(V);
+ return Ice::Utils::bitCopy<FpType>(V);
}
private:
« src/IceUtils.h ('K') | « src/IceUtils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698