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

Fix building with clang on Linux

XMLWordPrintable

      Opened for the sake of Anton Bobrov, see https://github.com/openjdk/jdk/pull/15928

      Currently clang build (--with-toolchain-type=clang) is broken due to the following warnings that result in errors by default:

      src/hotspot/os/linux/os_linux.cpp:2843:65: error: 'static_assert' with no message is a C++17 extension [-Werror,-Wc++17-extensions]
        static_assert(MAP_FIXED_NOREPLACE == MAP_FIXED_NOREPLACE_value);
                                                                      ^
                                                                      , ""
      1 error generated.

      src/java.base/unix/native/libnet/DefaultProxySelector.c:378:41: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
          proxies = (*g_proxy_resolver_lookup)(resolver, uri, NULL, &error);
                                              ^
      src/java.base/unix/native/libnet/DefaultProxySelector.c:397:63: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
                                      (*g_network_address_parse_uri)(proxies[i], 0,
                                                                    ^
      src/java.base/unix/native/libnet/DefaultProxySelector.c:402:70: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
                                  phost = (*g_network_address_get_hostname)(conn);
                                                                           ^
      src/java.base/unix/native/libnet/DefaultProxySelector.c:403:66: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
                                  pport = (*g_network_address_get_port)(conn);
                                                                       ^
      src/java.base/unix/native/libnet/DefaultProxySelector.c:445:22: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
              (*g_strfreev)(proxies);
                           ^
      src/java.base/unix/native/libnet/DefaultProxySelector.c:448:25: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
              (*g_clear_error)(&error);

            Unassigned Unassigned
            ihse Magnus Ihse Bursie
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: