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

Disable misleading-indentation on clang as well as gcc

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 16
    • 16
    • infrastructure
    • None
    • $ 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

    • b23
    • x86_64
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: