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

Vladimir Kozlov kvn at openjdk.org
Thu Jun 30 14:51:30 UTC 2022


On Thu, 30 Jun 2022 13:51:00 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> This fixes three warnings in my gcc 12 build on Ubuntu 22.04.

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);```

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

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


More information about the hotspot-compiler-dev mailing list