RFR: JDK-8160353: narrowing conversion error is occurred with GCC 6
Kim Barrett
kim.barrett at oracle.com
Mon Jun 27 18:12:14 UTC 2016
> On Jun 27, 2016, at 10:26 AM, Yasumasa Suenaga <yasuenag at gmail.com> wrote:
>
> Hi all,
>
> This review request relates to JDK-8160310: HotSpot cannot be built with GCC 6 .
>
> I encountered narrowing conversion error when I compiled OpenJDK 9 with GCC 6
> on Fedora 24 x64.
> I think these error should be fixed.
>
> I uploaded webrev.
> Could you review it?
>
> http://cr.openjdk.java.net/~ysuenaga/JDK-8160353/webrev.00/
The warnings being encountered here are all a result of attempting to build a code base written for C++98 with a C++11 (or later) compiler. C++11 made an incompatible change to aggregate initialization, forbidding implicit narrowing conversions. A few months ago a change was made to explicitly use -std=gnu++98 for exactly this reason (see JDK-8151841), but that seems to have gotten lost in the transition to the new build system (see JDK-8156980).
I would prefer that compiler configuration issue got fixed and these kinds of issues be deferred to a future modernization project.
More information about the hotspot-dev
mailing list