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

Using mixed types in MIN2/MAX2 functions causes build problems on s390 (32-bit)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • 9.1
    • 9
    • hotspot
    • None
    • gc

      The MIN2/MAX2 functions are implemented using templates and require both arguments to be of the same type. This is a problem when one parameter is of size_t type and the second of uintx type and the platform has size_t defined as eg. unsigned long as on s390 (32-bit).

      A solution is to typecast the smaller type (uintx) to size_t which is of the same or larger size.

            dhorak Dan HorĂ¡k (Inactive)
            jwilhelm Jesper Wilhelmsson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: