RFR(XXS): 8056175: Change "8048150: Allow easy configurations for large CDS archives" triggers conversion warning with older GCC
Volker Simonis
volker.simonis at gmail.com
Wed Aug 27 14:58:30 UTC 2014
Hi,
could somebody please review and sponsor the following tiny change
which fixes the HotSpot build on older versions of GCC after change
"8048150: Allow easy configurations for large CDS archives":
http://cr.openjdk.java.net/~simonis/webrevs/8056175/
https://bugs.openjdk.java.net/browse/JDK-8056175
For GCC versions before 4.3 we still use the "-Wconversion" flag so if
we build with such a GCC the code introduced by "8048150: Allow easy
configurations for large CDS archives" will trigger the following
warnings which are treated as errors:
/src/hotspot-rt/src/share/vm/memory/metaspaceShared.cpp: In static
member function 'static void
MetaspaceShared::estimate_regions_size()':
/src/hotspot-rt/src/share/vm/memory/metaspaceShared.cpp:1124: warning:
converting to 'uintx' from 'double'
/src/hotspot-rt/src/share/vm/memory/metaspaceShared.cpp:1125: warning:
converting to 'uintx' from 'double'
/src/hotspot-rt/src/share/vm/memory/metaspaceShared.cpp:1126: warning:
converting to 'uintx' from 'double'
/src/hotspot-rt/src/share/vm/memory/metaspaceShared.cpp:1127: warning:
converting to 'uintx' from 'double'
/src/hotspot-rt/src/share/vm/memory/metaspaceShared.cpp:1129: warning:
converting to 'uintx' from 'double'
/src/hotspot-rt/src/share/vm/memory/metaspaceShared.cpp:1130: warning:
converting to 'uintx' from 'double'
/src/hotspot-rt/src/share/vm/memory/metaspaceShared.cpp:1131: warning:
converting to 'uintx' from 'double'
/src/hotspot-rt/src/share/vm/memory/metaspaceShared.cpp:1132: warning:
converting to 'uintx' from 'double'
The fix is trivial - just implicitly cast the result of the conversion to uintx.
Thank you and best regards,
Volker
More information about the hotspot-dev
mailing list