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

Disable VS warning C4307

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • 16
    • 16
    • hotspot
    • b17
    • generic
    • windows

    Description

      When building with VS2017, the build currently fails with :

      > ./test/hotspot/gtest/utilities/test_align.cpp(96): error C2220: warning treated as error - no 'object' file generated
      > ./test/hotspot/gtest/utilities/test_align.cpp(156): note: see reference to function template instantiation 'void static_test_alignments<T,A>(void)' being compiled
      > with
      > [
      > T=int64_t,
      > A=uint8_t
      > ]
      > ./test/hotspot/gtest/utilities/test_align.cpp(162): note: see reference to function template instantiation 'void test_alignments<int64_t,uint8_t>(void)' being compiled
      > ./test/hotspot/gtest/utilities/test_align.cpp(96): warning C4307: '+': integral constant overflow
      >
      >

      This might be related to an issue fixed at least in some versions of VS2019 , that is discussed here :

      https://developercommunity.visualstudio.com/content/problem/211134/unsigned-integer-overflows-in-constexpr-functionsa.html

      This problem has already come up elsewhere, see : 8253089: Windows (MSVC 2017) build fails after JDK-8243208
      So it might be a good idea to disable the warning .

      Attachments

        Issue Links

          Activity

            People

              mbaesken Matthias Baesken
              mbaesken Matthias Baesken
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: