RFR: 8212023: Implicit narrowing in Solaris/sparc initializers

Kim Barrett kim.barrett at oracle.com
Thu Oct 11 04:52:34 UTC 2018


Please review this small fix to eliminate some implicit narrowings in
initializer lists in Solaris/sparc code.  Implicit narrowings in
initializer lists are not permitted starting with C++11.

In os::dll_load, changed the definition of arch_t to have its member
types match those of the underlying values used to initialize them,
e.g. unsigned char rather than char.

In nativeInst_sparc.cpp, in the various int[] offsets arrays in test
functions, cast large unsigned values to int. An alternative would be
to change the array element type to uint, but that would require
additional modification of the using code in some cases, to account
for the change of type. Also note there are no callers of these test
functions.

CR:
https://bugs.openjdk.java.net/browse/JDK-8212023

Webrev:
http://cr.openjdk.java.net/~kbarrett/8212023/open.00/

Testing:
mach5 tier1 for solaris/sparc only.



More information about the hotspot-dev mailing list