PATCH: using mixed types in MIN2/MAX2 functions

Dan Horák dan at
Thu Jun 12 09:05:13 UTC 2014


this the last and largest part of my changes required on s390 (32-bit)
to build OpenJDK out of the box. 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).

As a solution [1] I chose to typecast the smaller type (uintx) to size_t
which is of same or larger size.


Note: I'm Red Hat employee (dhorak at, so I should be covered
by Red Hat's CLA for my contributions.

	With regards


More information about the hotspot-dev mailing list