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

isnanf is obsolete

XMLWordPrintable

    • b14
    • generic
    • other

        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

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

                Created:
                Updated:
                Resolved: