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

--disable-warnings-as-errors does not work for HotSpot build

XMLWordPrintable

    • b107

        Passing --disable-warnings-as-errors to configure not works in jdk9/hs-rt repo on Linux-x64 OS. Running following configure&build command give compilation error:
         sh ./configure --disable-warnings-as-errors --enable-native-coverage --enable-debug
        make all
        ...
        /home/dmitry/work/bugs/disable_warnings_as_errors/jdk9-hs-rt/hotspot/src/share/vm/gc/shared/genCollectedHeap.cpp: In function ‘ScratchBlock* removeSmallestScratch(ScratchBlock**)’:
        /home/dmitry/work/bugs/disable_warnings_as_errors/jdk9-hs-rt/hotspot/src/share/vm/gc/shared/genCollectedHeap.cpp:1032:33: error: ‘smallest_ptr’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
           *smallest_ptr = smallest->next;
                                         ^
        cc1plus: all warnings being treated as errors
        make[8]: *** [genCollectedHeap.o] Error 1
        ...

        The issue reproducible with --enable-native-coverage flag to configure.

              iignatyev Igor Ignatyev (Inactive)
              ddmitriev Dmitry Dmitriev
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: