chore: Add gcc-12 workaround (#5554)

This change silences a dummy warning, which is breaking builds with GCC 12 (but not newer versions of GCC) in release mode only.
This commit is contained in:
Bronek Kozicki
2025-07-11 19:57:09 +01:00
committed by GitHub
parent b8626ea3c6
commit 258ba71363

View File

@@ -48,8 +48,10 @@ rngfill(void* buffer, std::size_t bytes, Generator& g)
#ifdef __GNUC__
// gcc 11.1 (falsely) warns about an array-bounds overflow in release mode.
// gcc 12.1 (also falsely) warns about an string overflow in release mode.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#endif
if (bytes > 0)