On Wed, 6 Sep 2023 14:29:56 GMT, Antonios Printezis <[email protected]> wrote:
> The build failure happens when building on RISC-V with GCC 12.3. Is there a
> better way to address this than disabling the stringop-overflow warnings for
> the two files in question?
How about something like this in `zPageAllocator.cpp` / `xPageAllocator.cpp` as
a compromise?
+ PRAGMA_DIAG_PUSH
+ PRAGMA_STRINGOP_OVERFLOW_IGNORED
// Record flushed pages as claimed
Atomic::add(&_claimed, flushed);
+ PRAGMA_DIAG_POP
This should only disable the warning for the two uses of `Atomic::add()` that
exhibit the issue.
@kimbarrett @erikj79 I know you two had concerns about disabling the warning
for the entire files. Does this look reasonable?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15593#issuecomment-1724243655