JDK-6839126 : Type error found by newer windows compiler
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-05-08
  • Updated: 2011-04-19
  • Resolved: 2011-04-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u18Fixed 7 b60Fixed hs16Fixed
Description
Type error when compiling with latest Platform SDK VS2008 Visual Studio compiler on Windows 64bit:

diff --git a/src/share/vm/adlc/filebuff.hpp b/src/share/vm/adlc/filebuff.hpp
--- a/src/share/vm/adlc/filebuff.hpp
+++ b/src/share/vm/adlc/filebuff.hpp
@@ -73,7 +73,7 @@ class FileBuff {
 
   // This converts a pointer into the buffer to a file offset.  It only works
   // when the pointer is valid (i.e. just obtained from getline()).
-  long getoff(const char* s) { return _bufoff + (s - _buf); }
+  long getoff(const char* s) { return _bufoff + (long)(s - _buf); }
 };
 
 //------------------------------FileBuffRegion---------------------------------

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/116b019a3961
17-05-2009

EVALUATION See description.
08-05-2009