Revision: 9242
Author: [email protected]
Date: Mon Sep 12 05:16:30 2011
Log: Add an explicit cast for an integral promotion that MSVC warns
about.
I don't think the warning is valid, but it's a good sign that MSVC is
fixin' to generate the wrong code no matter what I think.
[email protected]
BUG=
TEST=
Review URL: http://codereview.chromium.org/7869008
http://code.google.com/p/v8/source/detail?r=9242
Modified:
/branches/bleeding_edge/src/utils.h
=======================================
--- /branches/bleeding_edge/src/utils.h Mon Sep 12 03:50:50 2011
+++ /branches/bleeding_edge/src/utils.h Mon Sep 12 05:16:30 2011
@@ -213,7 +213,7 @@
// Tells whether the provided value fits into the bit field.
static bool is_valid(T value) {
- return (static_cast<uint32_t>(value) & ~kMax) == 0;
+ return (static_cast<uint32_t>(value) & ~static_cast<uint32_t>(kMax))
== 0;
}
// Returns a uint32_t with the bit field value encoded.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev