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

[11u] hotspot fails to build with GCC 12 and newer (non-static data member initializers)

    XMLWordPrintable

Details

    • b04

    Description

      Attempts to build current jdk11u-dev with GCC >= 12 (tested: Debian 12.2.0-14) fail due to (at least)

      ../../src/hotspot/os/linux/cgroupV2Subsystem_linux.hpp:54:32: error: non-static data member initializers only available with '-std=c++11' or '-std=gnu++11' [-Werror=c++11-extensions]

      This is an issue for jdk11u-dev which uses the C++ standard version '-std=gnu++98'. It is not an issue for later JDK versions which have moved to newer standards (JEP 347 moved JDK16 to -std=c++14): therefore an 11u-specific fix is required.

      The approach used for this code when backported to jdk8u-dev was to remove the initialisers.

      Attachments

        Issue Links

          Activity

            People

              jdowland Jonathan Dowland
              jdowland Jonathan Dowland
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: