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

fdlibm uses HI/LO macros which depend on pointer aliasing - portability issue

    Details

    • Type: Bug
    • Status: Open
    • Priority: P5
    • Resolution: Unresolved
    • Affects Version/s: 1.3.0
    • Fix Version/s: tbd_minor
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      fdlibm 5.2 uses HI and LO macros which depend on pointer aliasing :-


      #ifdef __LITTLE_ENDIAN
      #define __HI(x) *(1+(int*)&x)
      #define __LO(x) *(int*)&x
      #define __HIp(x) *(1+(int*)x)
      #define __LOp(x) *(int*)x
      #else
      #define __HI(x) *(int*)&x
      #define __LO(x) *(1+(int*)&x)
      #define __HIp(x) *(int*)x
      #define __LOp(x) *(1+(int*)x)
      #endif

      Compilers such as GCC 2.95 are senstive compared to old versions
      of GCC and thus can't handle these macros as intended.

      From a portability perspective it would be good to replace these
      macros in a future Java 2 release.
      ###@###.### 2004-11-11 22:24:08 GMT

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                darcy Joe Darcy
                Reporter:
                alanb Alan Bateman
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported:
                  Indexed: