Revision: 5093
Author: [email protected]
Date: Mon Jul 19 02:51:33 2010
Log: Landing for [email protected].

TYPE_CHECK in v8.h should assign to volatile qualified null-pointer.

Unless the pointer is volatile qualified, Clang will warn that LLVM
removes the assignment during optimization. This is not a problem as
that code should never execute, but the warning is treated as an error
when building Chromium, and thus stops the build.

Code review URL: http://codereview.chromium.org/3005010/show
http://code.google.com/p/v8/source/detail?r=5093

Modified:
 /branches/bleeding_edge/include/v8.h

=======================================
--- /branches/bleeding_edge/include/v8.h        Mon Jul 12 06:17:27 2010
+++ /branches/bleeding_edge/include/v8.h        Mon Jul 19 02:51:33 2010
@@ -146,9 +146,9 @@

 // --- H a n d l e s ---

-#define TYPE_CHECK(T, S)                              \
-  while (false) {                                     \
-    *(static_cast<T**>(0)) = static_cast<S*>(0);      \
+#define TYPE_CHECK(T, S)                                       \
+  while (false) {                                              \
+    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
   }

 /**

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to