7186278: Build error after CR#6995781 / 7151532 with GCC 4.7.0

Yasumasa Suenaga suenaga.yasumasa at lab.ntt.co.jp
Mon Jul 23 23:09:56 PDT 2012


When I build JDK8 with GCC 4.7.0 on Fedora17, it fails with message as following:

/usr/src/OpenJDK/8/test/jdk8/hotspot/src/share/vm/utilities/hashtable.hpp: In instantiation of 'int Hashtable<T, F>::index_for(Symbol*) [with T = constantPoolOopDesc*; short unsigned int F = 256u]':
/usr/src/OpenJDK/8/test/jdk8/hotspot/src/share/vm/utilities/hashtable.cpp:317:16:   required from here
/usr/src/OpenJDK/8/test/jdk8/hotspot/src/share/vm/utilities/hashtable.hpp:263:44: error: 'hash_to_index' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
/usr/src/OpenJDK/8/test/jdk8/hotspot/src/share/vm/utilities/hashtable.hpp:263:44: note: declarations in dependent base 'BasicHashtable<256u>' are not found by unqualified lookup
/usr/src/OpenJDK/8/test/jdk8/hotspot/src/share/vm/utilities/hashtable.hpp:263:44: note: use 'this->hash_to_index' instead

This problem is caused by C++ template class.
We have to explicit references of C++ class member to access them.

  Bug 43282 - GCC looks into dependent bases during unqualified lookup

I posted this problem on BugDatabase as a new bug.

I've made a patch which attached in this email, and it works fine in my environment.
I would like to contribute this patch, and I hope to merge this patch into mainline.

Please cooperate.

Best regards,

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 7186278.patch
Url: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20120724/f6f0ec9a/7186278.patch 

More information about the hotspot-runtime-dev mailing list