RFR: 8286562: GCC 12 reports some compiler warnings [v5]
Yasumasa Suenaga
ysuenaga at openjdk.java.net
Tue May 17 13:32:43 UTC 2022
On Tue, 17 May 2022 04:52:44 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> src/hotspot/share/opto/memnode.cpp line 1413:
>>
>>> 1411: bt == T_BYTE || bt == T_SHORT ||
>>> 1412: bt == T_INT || bt == T_LONG, "wrong type = %s", type2name(bt));
>>> 1413: PRAGMA_DIAG_POP
>>
>> The problem here is the definition of type2name, which returns NULL for an unknown BasicType. It would probably be better if it returned a recognizable string for that situation, eliminating this warning at it's source.
>
> While looking at type2name, I noticed the comment for the immediately preceding type2name_tab is wrong.
The warning has gone in new commit, and I fixed the comment for `type2name_tab` in it.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8646
More information about the build-dev
mailing list