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

GCC #pragma not allowed inside functions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P5
    • Resolution: Won't Fix
    • Affects Version/s: 10.0.2
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      linux_redhat_6.2

      Description

      When trying to build JDK 10 with gcc 4.4.7 (e.g. RHEL 6) then the build fails with:

      In file included from /home/jdk9/jdk10u/src/hotspot/share/runtime/os.inline.hpp:30,
                       from /home/jdk9/jdk10u/src/hotspot/share/runtime/thread.inline.hpp:29,
                       from /home/jdk9/jdk10u/src/hotspot/share/runtime/handles.inline.hpp:29,
                       from /home/jdk9/jdk10u/src/hotspot/share/runtime/reflectionUtils.hpp:32,
                       from /home/jdk9/jdk10u/src/hotspot/share/classfile/systemDictionary.hpp:34,
                       from /home/jdk9/jdk10u/src/hotspot/share/ci/ciEnv.hpp:30,
                       from /home/jdk9/jdk10u/src/hotspot/share/ci/ciUtilities.hpp:28,
                       from /home/jdk9/jdk10u/src/hotspot/share/ci/ciNullObject.hpp:30,
                       from /home/jdk9/jdk10u/src/hotspot/share/ci/ciConstant.hpp:29,
                       from /home/jdk9/jdk10u/src/hotspot/share/ci/ciArray.hpp:29,
                       from /home/jdk9/jdk10u/src/hotspot/share/precompiled/precompiled.hpp:35:
      /home/jdk9/jdk10u/src/hotspot/os/linux/os_linux.inline.hpp: In static member function ‘static dirent* os::readdir(DIR*, dirent*)’:
      /home/jdk9/jdk10u/src/hotspot/os/linux/os_linux.inline.hpp:103: error: #pragma GCC diagnostic not allowed inside functions
      /home/jdk9/jdk10u/src/hotspot/os/linux/os_linux.inline.hpp:104: error: #pragma GCC diagnostic not allowed inside functions
      /home/jdk9/jdk10u/src/hotspot/os/linux/os_linux.inline.hpp:120: error: #pragma GCC diagnostic not allowed inside functions
      In file included from /home/jdk9/jdk10u/src/hotspot/share/runtime/os.inline.hpp:30,
                       from /home/jdk9/jdk10u/src/hotspot/share/runtime/thread.inline.hpp:29,
                       from /home/jdk9/jdk10u/src/hotspot/share/runtime/handles.inline.hpp:29,
                       from /home/jdk9/jdk10u/src/hotspot/share/runtime/reflectionUtils.hpp:32,
                       from /home/jdk9/jdk10u/src/hotspot/share/classfile/systemDictionary.hpp:34,
                       from /home/jdk9/jdk10u/src/hotspot/share/ci/ciEnv.hpp:30,
                       from /home/jdk9/jdk10u/src/hotspot/share/ci/ciUtilities.hpp:28,
                       from /home/jdk9/jdk10u/src/hotspot/share/ci/ciNullObject.hpp:30,
                       from /home/jdk9/jdk10u/src/hotspot/share/ci/ciConstant.hpp:29,
                       from /home/jdk9/jdk10u/src/hotspot/share/ci/ciArray.hpp:29,
                       from /home/jdk9/jdk10u/src/hotspot/share/precompiled/precompiled.hpp:35:
      /home/jdk9/jdk10u/src/hotspot/os/linux/os_linux.inline.hpp: In static member function ‘static dirent* os::readdir(DIR*, dirent*)’:
      /home/jdk9/jdk10u/src/hotspot/os/linux/os_linux.inline.hpp:103: error: #pragma GCC diagnostic not allowed inside functions
      /home/jdk9/jdk10u/src/hotspot/os/linux/os_linux.inline.hpp:104: error: #pragma GCC diagnostic not allowed inside functions
      /home/jdk9/jdk10u/src/hotspot/os/linux/os_linux.inline.hpp:120: error: #pragma GCC diagnostic not allowed inside functions
      gmake[3]: *** [/home/jdk9/jdk10u/build/release/hotspot/variant-server/libjvm/gtest/objs/precompiled/precompiled.hpp.gch] Error 1

      Moving the pragma outside the function lets the build proceed.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sgehwolf Severin Gehwolf
              Reporter:
              sgehwolf Severin Gehwolf
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: