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

Disable misleading-indentation on clang as well as gcc

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 16
    • Fix Version/s: 16
    • Component/s: infrastructure
    • Labels:
      None
    • Environment:

      $ lsb_release -d
      Description: Ubuntu 20.04.1 LTS

      $ clang --version
      clang version 10.0.0-4ubuntu1
      Target: x86_64-pc-linux-gnu
      Thread model: posix
      InstalledDir: /usr/bin

    • Subcomponent:
    • Resolved In Build:
      b23
    • CPU:
      x86_64
    • OS:
      linux_ubuntu

      Description

      When compiling the JDK using Clang 10.0.0 on Ubuntu 20.04, I get a few error messages like this one:

      src/hotspot/share/c1/c1_LIR.cpp:526:50: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]

      To reproduce:

      $ bash configure --with-toolchain-type=clang

      $ make images

      (fails with "error: misleading indentation..." errors)

      Adding 'misleading-indentation' to the 'DISABLED_WARNINGS_clang' variable in different .gmk files under the 'make' directory seems to fix the problem.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ihse Magnus Ihse Bursie
              Reporter:
              rcastanedalo Roberto Castaneda Lozano
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: