From 11fb976bf477c66f68a7e6910d7f8db5f63aaa79 Mon Sep 17 00:00:00 2001 From: "bmeurer@chromium.org" Date: Tue, 5 Aug 2014 14:19:22 +0000 Subject: [PATCH] Revert "Unbreak build with clang." This reverts commit r22878 and fixes the actual bug instead. R=hpayer@chromium.org Review URL: https://codereview.chromium.org/446573002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22880 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- build/standalone.gypi | 3 ++- src/liveedit.cc | 2 +- src/objects.h | 6 ++++-- src/types.h | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/build/standalone.gypi b/build/standalone.gypi index 9bf45fb..2ed19f6 100644 --- a/build/standalone.gypi +++ b/build/standalone.gypi @@ -216,7 +216,8 @@ or OS=="netbsd"', { 'target_defaults': { 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter', - '-Wno-long-long', '-pthread', '-fno-exceptions' ], + '-Wno-long-long', '-pthread', '-fno-exceptions', + '-pedantic' ], 'cflags_cc': [ '-Wnon-virtual-dtor', '-fno-rtti', '-std=gnu++0x' ], 'ldflags': [ '-pthread', ], 'conditions': [ diff --git a/src/liveedit.cc b/src/liveedit.cc index ebe1d1f..57258b0 100644 --- a/src/liveedit.cc +++ b/src/liveedit.cc @@ -174,7 +174,7 @@ class Differencer { static const int kDirectionSizeBits = 2; static const int kDirectionMask = (1 << kDirectionSizeBits) - 1; - static const int kEmptyCellValue = -1 << kDirectionSizeBits; + static const int kEmptyCellValue = ~0u << kDirectionSizeBits; // This method only holds static assert statement (unfortunately you cannot // place one in class scope). diff --git a/src/objects.h b/src/objects.h index 6c6cefe..4c50125 100644 --- a/src/objects.h +++ b/src/objects.h @@ -9005,7 +9005,8 @@ class Name: public HeapObject { STATIC_ASSERT(IS_POWER_OF_TWO(kMaxCachedArrayIndexLength + 1)); static const unsigned int kContainsCachedArrayIndexMask = - (~kMaxCachedArrayIndexLength << ArrayIndexLengthBits::kShift) | + (~static_cast(kMaxCachedArrayIndexLength) + << ArrayIndexLengthBits::kShift) | kIsNotArrayIndexMask; // Value of empty hash field indicating that the hash is not computed. @@ -9089,7 +9090,8 @@ class String: public Name { STATIC_ASSERT(IS_POWER_OF_TWO(kMaxCachedArrayIndexLength + 1)); static const unsigned int kContainsCachedArrayIndexMask = - (~kMaxCachedArrayIndexLength << ArrayIndexLengthBits::kShift) | + (~static_cast(kMaxCachedArrayIndexLength) + << ArrayIndexLengthBits::kShift) | kIsNotArrayIndexMask; // Representation of the flat content of a String. diff --git a/src/types.h b/src/types.h index f141712..0af790a 100644 --- a/src/types.h +++ b/src/types.h @@ -155,7 +155,8 @@ namespace internal { V(UntaggedFloat64, 1 << 27 | kSemantic) \ V(UntaggedPtr, 1 << 28 | kSemantic) \ V(TaggedInt, 1 << 29 | kSemantic) \ - V(TaggedPtr, -1 << 30 | kSemantic) /* MSB has to be sign-extended */ \ + /* MSB has to be sign-extended */ \ + V(TaggedPtr, static_cast(~0u << 30) | kSemantic) \ \ V(UntaggedInt, kUntaggedInt1 | kUntaggedInt8 | \ kUntaggedInt16 | kUntaggedInt32) \ -- 2.7.4