compilation failure using gcc 4.7.2

Peter Levart peter.levart at gmail.com
Sun Nov 4 13:09:02 PST 2012


Hi,

Current head of jdk8/hotspot repository (3790:4d37eb50b9b1) can not be 
built with gcc 4.7.2.

I had to make the following changes to compile with gcc 4.7.2 (on linux):


diff -r 4d37eb50b9b1 src/share/vm/memory/binaryTreeDictionary.cpp
--- a/src/share/vm/memory/binaryTreeDictionary.cpp      Thu Nov 01 
14:11:16 2012 -0700
+++ b/src/share/vm/memory/binaryTreeDictionary.cpp      Sun Nov 04 
22:07:29 2012 +0100
@@ -239,7 +239,7 @@
    } else {
      if (nextTC == NULL) {
        // Removing chunk at tail of list
-      link_tail(prevFC);
+      this->link_tail(prevFC);
      }
      // Chunk is interior to the list
      prevFC->link_after(nextTC);
@@ -296,7 +296,7 @@

    Chunk_t* fc = tail();
    fc->link_after(chunk);
-  link_tail(chunk);
+  this->link_tail(chunk);

    assert(!tail() || size() == tail()->size(), "Wrong sized chunk in 
list");
    FreeList_t<Chunk_t>::increment_count();
@@ -323,7 +323,7 @@
      chunk->link_after(fc);
    } else {
      assert(tail() == NULL, "List is inconsistent");
-    link_tail(chunk);
+    this->link_tail(chunk);
    }
    head()->link_after(chunk);
    assert(!head() || size() == head()->size(), "Wrong sized chunk in 
list");
@@ -940,7 +940,7 @@
    void do_tree(TreeList<Chunk_t, FreeList_t>* tl) {
      if (tl != NULL) {
        do_tree(tl->left());
-      do_list(tl);
+      this->do_list(tl);
        do_tree(tl->right());
      }
    }
@@ -952,7 +952,7 @@
    void do_tree(TreeList<Chunk_t, FreeList_t>* tl) {
      if (tl != NULL) {
        do_tree(tl->right());
-      do_list(tl);
+      this->do_list(tl);
        do_tree(tl->left());
      }
    }
@@ -1008,7 +1008,7 @@
    bool do_tree(TreeList<Chunk_t, FreeList_t>* tl) {
      if (tl != NULL) {
        if (do_tree(tl->left())) return true;
-      if (do_list(tl)) return true;
+      if (this->do_list(tl)) return true;
        if (do_tree(tl->right())) return true;
      }
      return false;
@@ -1022,7 +1022,7 @@
    bool do_tree(TreeList<Chunk_t, FreeList_t>* tl) {
      if (tl != NULL) {
        if (do_tree(tl->right())) return true;
-      if (do_list(tl)) return true;
+      if (this->do_list(tl)) return true;
        if (do_tree(tl->left())) return true;
      }
      return false;



Regards, Peter



More information about the hotspot-runtime-dev mailing list