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

Unified Diff: src/utils.h

Issue 3117007: Allow compiling with strict aliasing enabled on GCC 4.4. (Closed)
Patch Set: Created 10 years, 4 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
« no previous file with comments | « src/top.cc ('k') | src/x64/assembler-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils.h
diff --git a/src/utils.h b/src/utils.h
index 236b85e64d096674409a68a2494ddd644f47690a..d15319c7a1c42408dde7220640f48cb47d38a212 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -739,7 +739,11 @@ inline Dest BitCast(const Source& source) {
return dest;
}
-} } // namespace v8::internal
+template <class Dest, class Source>
+inline Dest BitCast(Source* const & source) {
+ return BitCast<Dest>(reinterpret_cast<uintptr_t>(source));
+}
+} } // namespace v8::internal
#endif // V8_UTILS_H_
« no previous file with comments | « src/top.cc ('k') | src/x64/assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698