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

Debug build failure with clang-10 due to -Wdeprecated-copy

    XMLWordPrintable

Details

    • b06
    • generic
    • generic

    Description

      Tools summary:
      * Boot JDK: openjdk version "16-internal" 2021-03-16 OpenJDK Runtime Environment (build 16-internal+0-git-3820998e2) OpenJDK 64-Bit Server VM (build 16-internal+0-git-3820998e2, mixed mode, sharing) (at /mnt/share/openjdk/packages/boot-jdk/aarch64/latest.old)
      * Toolchain: clang (clang/LLVM)
      * C Compiler: Version 10.0.0 (at /usr/bin/clang)
      * C++ Compiler: Version 10.0.0 (at /usr/bin/clang++)



      ERROR: Build failed for target 'images' in configuration '/home/eriliu02/entllt/openjdk/clang-fastdebug' (exit code 2)
      Stopping sjavac server=== Output from failing command(s) repeated here ===
      * For target hotspot_variant-server_libjvm_gtest_objs_test_mathexact.o:
      In file included from /home/eriliu02/entllt/openjdk/jdk_src/test/hotspot/gtest/opto/test_mathexact.cpp:26:
      In file included from /home/eriliu02/entllt/openjdk/jdk_src/src/hotspot/share/opto/mulnode.hpp:28:
      /home/eriliu02/entllt/openjdk/jdk_src/src/hotspot/share/opto/node.hpp:1371:8: error: definition of implicit copy constructor for 'DUIterator_Fast' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
        void operator=(const DUIterator_Fast& that)
             ^
      /home/eriliu02/entllt/openjdk/jdk_src/src/hotspot/share/opto/node.hpp:1379:10: note: in implicit copy constructor for 'DUIterator_Fast' first required here
        return DUIterator_Fast(this, 0);
               ^
      /home/eriliu02/entllt/openjdk/jdk_src/src/hotspot/share/opto/node.hpp:1428:8: error: definition of implicit copy constructor for 'DUIterator_Last' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
        void operator=(const DUIterator_Last& that)
             ^
      /home/eriliu02/entllt/openjdk/jdk_src/src/hotspot/share/opto/node.hpp:1436:10: note: in implicit copy constructor for 'DUIterator_Last' first required here
        return DUIterator_Last(this, (ptrdiff_t)_outcnt - 1);
               ^
      2 errors generated.* All command lines available in /home/eriliu02/entllt/openjdk/clang-fastdebug/make-support/failure-logs.
      === End of repeated output ===




      After suppressing the Wdeprecated-copy warining, another error occurs.

      * For target hotspot_variant-server_libjvm_objs_threadHeapSampler.o:
      /home/haosun01/tmp/build-err/jdk_src/src/hotspot/share/runtime/threadHeapSampler.cpp:397:33: error: implicit conversion from 'unsigned long' to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Werror,-Wimplicit-int-float-conversion]
        assert(result > 0 && result < SIZE_MAX, "Result is not in an acceptable range.");
                                    ~ ^~~~~~~~
      /usr/include/stdint.h:227:22: note: expanded from macro 'SIZE_MAX'
      # define SIZE_MAX (18446744073709551615UL)
                                       ^~~~~~~~~~~~~~~~~~~~~~
       

      -Wimplicit-int-float-conversion was first introduced in clang 10.

      See the flags in clang 9 [1] and clang 10 [2].

      [1] https://releases.llvm.org/9.0.0/tools/clang/docs/DiagnosticsReference.html

      [2] https://releases.llvm.org/10.0.0/tools/clang/docs/DiagnosticsReference.html

      Attachments

        Issue Links

          Activity

            People

              eliu Eric Liu (Inactive)
              eliu Eric Liu (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: