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

hotspot\src\share\vm\interpreter\bytecodes.cpp doesn't compile with VS2010 on AMD64

XMLWordPrintable

    • b02
    • generic
    • generic

        \hotspot\src\share\vm\interpreter\bytecodes.cpp(158) : error C2220: warning treated as error - no 'object' file generated
        d:\mercurial\hotspot_main\src\share\vm\interpreter\bytecodes.cpp(158) : warning C4748: /GS can not protect parameters and local variables from local buffer overrun because optimizations are disabled in function

        The reason is that bytecodes.cpp is surrounded by

        // Windows AMD64 Compiler Hangs compiling this file
        // unless optimization is off
        #ifdef _M_AMD64
        #pragma optimize ("", off)
        #endif

        and when run with /O2 this will cause the compiler warning C4748. I don't understand why this only happens with VS2010 and not earlier compilers.

        Disabling optimizations for bytecodes.cpp does not seem necessary with VS2010 compilers (I tried removing the code), but apparently is necessary with older compilers. I'm not sure how to fix this.

              prr Philip Race
              prr Philip Race
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: