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

isnanf is obsolete

    XMLWordPrintable

    Details

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

      OS: Alpine Linux 3.11.6
      libc: musl (x86_64) version 1.1.24

    • Subcomponent:
    • Resolved In Build:
      b14
    • CPU:
      generic
    • OS:
      other

      Description

      from https://man7.org/linux/man-pages/man3/isnanf.3.html

      "Note that these functions are obsolete. C99 defines macros
             isfinite(), isinf(), and isnan() (for all types) replacing them."

       Building JDK with musl libc gives the error:
      -------------------
      src/hotspot/share/utilities/globalDefinitions_gcc.hpp:115:39: error: 'isnanf' was not declared in this scope; did you mean 'wscanf'?
        115 | inline int g_isnan(float f) { return isnanf(f); }
      -------------------

      This is because musl libc does not define isnanf. It only declares isnan:
      https://git.musl-libc.org/cgit/musl/tree/include/math.h#n78

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              avoitylov Aleksei Voitylov
              Reporter:
              alexsch Alexandr Scherbatiy
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: