Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8205677

[8u] casts and type change for 8u to enable later Windows compilers

    XMLWordPrintable

Details

    • b02

    Backports

      Description

        Experimentally compiling jdk8u on Windows with VS2017, this bug is to collect and fix the remaining simple changes for a hotspot build to succeed. e.g. Missing casts.


        1
        ...\jdk8u-dev\hotspot\src\share\vm\classfile\altHashing.cpp(227): warning C4838: conversion from 'unsigned int' to 'const jint' requires a narrowing conversion
        ...\jdk8u-dev\hotspot\src\share\vm\classfile\altHashing.cpp(238): warning C4838: conversion from 'unsigned int' to 'const jint' requires a narrowing conversion

        (jint) casts are present in the later JDK test/hotspot/gtest/classfile/test_AltHashing.cpp and look like they were in JDK9 from the start.


        2
        C:\jprt\T\P1\093628.kwalls\s\hotspot\src\share\vm\gc_implementation\parallelScavenge\gcTaskManager.cpp(1038): warning C4312: 'type cast': conversion from 'unsigned int' to 'Monitor *' of greater size


        3
        ..\hotspot\src\share\vm\oops/typeArrayOop.hpp(132): error C2440: '=': cannot convert from 'jlong' to 'jlong *'
        ..\hotspot\src\share\vm\oops/typeArrayOop.hpp(132): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast



        4
        ...\hotspot\src\share\vm\gc_implementation\concurrentMarkSweep\concurrentMarkSweepGeneration.cpp(6833): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)

        5
        ..\hotspot\src\share\vm\runtime\memprofiler.cpp(129): warning C4477: 'fprintf' : format string '%6ld' requires an argument of type 'long', but variadic argument 3 has type '::size_t'


        6
        ..\hotspot\src\share\vm\classfile\classFileParser.cpp(278): warning C4267: '=': conversion from 'size_t' to 'u2', possible loss of data

        Attachments

          Issue Links

            Activity

              People

                kevinw Kevin Walls
                kevinw Kevin Walls
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: