RFR: JDK-8289512: Fix GCC 12 warnings for adlc output_c.cpp [v2]

Thomas Stuefe stuefe at openjdk.org
Thu Jun 30 15:21:38 UTC 2022


On Thu, 30 Jun 2022 14:48:10 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   assert sprint did not overflow
>
> src/hotspot/share/adlc/output_c.cpp line 527:
> 
>> 525:         ndx+1, element_count, resource_mask);
>> 526: 
>> 527:     // "0x012345678, 0x012345678, 4294967295"
> 
> please add assert like next:
> ```assert((9 + 2*masklen + maskdigit) <= 37, "invalid value: masklen=%d, maskdigit=%d", masklen, maskdigit);```

I'm not sure that makes sense, since neither masklen nor maskdigit are part of printing anymore.

I added a check for overflow, does this test what you wanted?

-------------

PR: https://git.openjdk.org/jdk/pull/9335


More information about the hotspot-compiler-dev mailing list