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

gcc 10.2.1 produces an uninitialized warning in sharedRuntimeTrig.cpp

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b04

      Description

      Opening on behalf of Joshua Cao <joshcao@amazon.com>

      There is a warning when trying to build OpenJDK11 using gcc10.2.1. This warning does not happen when building newer JDK versions, it seems JDK-8211029 disabled the warning for maybe-uninitialized.

      * For target hotspot_variant-server_libjvm_objs_sharedRuntimeTrig.o:
      /home/joshcao/jdk/jdk11u-dev/src/hotspot/share/runtime/sharedRuntimeTrig.cpp: In function 'int __kernel_rem_pio2(double*, double*, int, int, int, const int*)':
      /home/joshcao/jdk/jdk11u-dev/src/hotspot/share/runtime/sharedRuntimeTrig.cpp:300:14: error: 'fq[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
        300 | fw = fq[0]-fw;
            | ~~~~^
      cc1plus: all warnings being treated as errors

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alvdavi David Alvarez
              Reporter:
              alvdavi David Alvarez
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: