Reviewers: Erik Corry,

Message:
Changes to compile V8 with

% clang++ --version
clang version 2.8 (trunk 112808)
Target: x86_64-apple-darwin10
Thread model: posix

Needed to remove -Werror, but that appears to be a clang bug. All tests pass.

Description:
clang compatibility changes

Please review this at http://codereview.chromium.org/3364002/show

Affected files:
  M src/ast.h
  M src/code-stubs.h
  M src/flag-definitions.h
  M src/platform.h


Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 5071b2cd73123a7d6129246e88fcaf5d6f81b87e..9fcf25672f8d25ef8ef37a41b765c9503fac7ebb 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1747,7 +1747,7 @@ class RegExpText: public RegExpTree {
   void AddElement(TextElement elm)  {
     elements_.Add(elm);
     length_ += elm.length();
-  };
+  }
   ZoneList<TextElement>* elements() { return &elements_; }
  private:
   ZoneList<TextElement> elements_;
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index c2dd0a7aacef7d3416e9c570b0c4f7df074d170b..98a5cf67b9902c03a0b9f170db4dd9f2a68342b3 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -110,10 +110,10 @@ class CodeStub BASE_EMBEDDED {

   static Major MajorKeyFromKey(uint32_t key) {
     return static_cast<Major>(MajorKeyBits::decode(key));
-  };
+  }
   static int MinorKeyFromKey(uint32_t key) {
     return MinorKeyBits::decode(key);
-  };
+  }

// Gets the major key from a code object that is a code stub or binary op IC.
   static Major GetMajorKey(Code* code_stub) {
Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index a143bcd6f5dc7f52dada84ab7b2af373b0861771..a63088d5a5fe2b6db024ebab712feb269ed8aee7 100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -283,7 +283,7 @@ DEFINE_bool(remote_debugger, false, "Connect JavaScript debugger to the "
                                     "debugger agent in another process")
 DEFINE_bool(debugger_agent, false, "Enable debugger agent")
 DEFINE_int(debugger_port, 5858, "Port to use for remote debugging")
-DEFINE_string(map_counters, false, "Map counters to a file")
+DEFINE_string(map_counters, NULL, "Map counters to a file")
 DEFINE_args(js_arguments, JSArguments(),
"Pass all remaining arguments to the script. Alias for \"--\".")

Index: src/platform.h
diff --git a/src/platform.h b/src/platform.h
index e0dd66e8435f7787f5aaef4c9d7a83c6d5bd1ed6..e9e7c2236749b188c1ff2fb15dac2ec53fc15763 100644
--- a/src/platform.h
+++ b/src/platform.h
@@ -302,7 +302,7 @@ class VirtualMemory {
   void* address() {
     ASSERT(IsReserved());
     return address_;
-  };
+  }

   // Returns the size of the reserved memory.
   size_t size() { return size_; }


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

Reply via email to