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

[AIX] Adapt code for C++ VLA rule

XMLWordPrintable

    • b21

        The declaration of Variable length array is causing compilation issues for 17.1.3 compiler.
        1 error generated.
        gmake[3]: *** [lib/CompileJvm.gmk:170: /home/jenkins/openjdk-suchi/jdk/build/aix-ppc64-server-fastdebug/hotspot/variant-server/libjvm/objs/os_perf_aix.o] Error 1
        gmake[2]: *** [make/Main.gmk:245: hotspot-server-libs] Error 2
        gmake[2]: *** Waiting for unfinished jobs....

        ERROR: Build failed for target 'images' in configuration 'aix-ppc64-server-fastdebug' (exit code 2)
        Stopping javac server

        === Output from failing command(s) repeated here ===
        * For target hotspot_variant-server_libjvm_objs_os_perf_aix.o:
        /home/jenkins/openjdk-suchi/jdk/src/hotspot/os/aix/os_perf_aix.cpp:79:12: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension]
           79 | char buf[BUF_LENGTH];
              | ^~~~~~~~~~
        /home/jenkins/openjdk-suchi/jdk/src/hotspot/os/aix/os_perf_aix.cpp:79:12: note: read of non-const variable 'BUF_LENGTH' is not allowed in a constant expression
        /home/jenkins/openjdk-suchi/jdk/src/hotspot/os/aix/os_perf_aix.cpp:76:17: note: declared here
           76 | static size_t BUF_LENGTH = 32 + sizeof(u_longlong_t);
              | ^

              sroy Suchismith Roy
              sroy Suchismith Roy
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: