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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P5
    • tbd
    • 1.3.0
    • core-libs
    • generic
    • 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

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

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: