Reviewers: Rico,
Description:
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=
Please review this at http://codereview.chromium.org/7869008/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/utils.h
Index: src/utils.h
diff --git a/src/utils.h b/src/utils.h
index
852a6ae26df81f198385f9afa9b89627a31f58c6..26c522b89f2025e06f56ffd4878aabdf51d42dbc
100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -213,7 +213,7 @@ class BitField {
// 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