On Mon, 18 Sep 2023 19:29:14 GMT, Antonios Printezis <to...@openjdk.org> wrote:
> 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. I think I'd prefer RISCV_ONLY(PRAGMA_STRINGOP_OVERFLOW_IGNORED) unless and until we encounter the problem for some other platform. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15593#issuecomment-1724625187