RFR: 8212023: Implicit narrowing in Solaris/sparc initializers
Thomas Schatzl
thomas.schatzl at oracle.com
Thu Oct 11 08:22:39 UTC 2018
Hi,
On Thu, 2018-10-11 at 00:52 -0400, Kim Barrett wrote:
> 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/
>
looks good.
Thomas
More information about the hotspot-dev
mailing list