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

#if <symbol> is wrong in the code

XMLWordPrintable

    • b23

        ASSERT and other symbols used incorrectly with #if are supposed to be defined or not, not always defined as 0 or 1. Therefore "#if ASSERT" is incorrect use. There are a few of them.

        hsx/hotspot-emb/hotspot/src/cpu/x86/vm/frame_x86.cpp:353:#if ASSERT
        hsx/hotspot-emb/hotspot/src/cpu/x86/vm/frame_x86.hpp:173:#if ASSERT
        hsx/hotspot-emb/hotspot/src/share/vm/c1/c1_LIR.hpp:2378:#if ASSERT
        hsx/hotspot-emb/hotspot/src/share/vm/ci/ciTypeFlow.cpp:2543:#if ASSERT

        hsx/hotspot-emb/hotspot/src/share/vm/code/compressedStream.cpp:198:#if _MSC_VER && _MSC_VER >=1400 && !defined(_WIN64)
        hsx/hotspot-emb/hotspot/src/share/vm/code/compressedStream.cpp:279:#if MSC_VER &&_MSC_VER >=1400 && !defined(_WIN64)

        hsx/hotspot-emb/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp:1313:#if VERIFY_OBJS_PROCESSED
        hsx/hotspot-emb/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp:2559:#if VERIFY_OBJS_PROCESSED

        hsx/hotspot-emb/hotspot/src/share/vm/prims/jvmtiImpl.cpp:893:#if JVMTI_TRACE

        They are preventing the use of -Wundef to catch errors like this. Once these are fixed, we can add -Wundef to the linux builds.

              jprovino Joseph Provino (Inactive)
              coleenp Coleen Phillimore
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: