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

compile error in shenandoahSupport.cpp with clang 9

XMLWordPrintable

    • gc
    • b07
    • os_x

      On Macosx with this compiler version :

      configure: Using clang C compiler version 9.0.0 [Apple LLVM version 9.0.0 (clang-900.0.39.2)

      we run into this build error :

      /nightly/jdk/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp:3019:33: error: operator '?:' has lower precedence than '+'; '+' will be evaluated first [-Werror,-Wparentheses]
        return Node::hash() + _native ? 1 : 0;
               ~~~~~~~~~~~~~~~~~~~~~~ ^
      /nightly/jdk/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp:3019:33: note: place parentheses around the '+' expression to silence this warning
        return Node::hash() + _native ? 1 : 0;
                                      ^
               ( )
      /nightly/jdk/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp:3019:33: note: place parentheses around the '?:' expression to evaluate it first
        return Node::hash() + _native ? 1 : 0;
                                      ^
                              ( )
      1 error generated.

      This might be related to recent changes :
      8227677: Shenandoah: C2: Make in-native LRB special case of normal LRB

            mbaesken Matthias Baesken
            mbaesken Matthias Baesken
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: