diff options
-rw-r--r-- | string/rawmemchr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/string/rawmemchr.c b/string/rawmemchr.c index b62d285d7e..d6ce8209be 100644 --- a/string/rawmemchr.c +++ b/string/rawmemchr.c @@ -32,6 +32,10 @@ RAWMEMCHR (const void *s, int c) PTRDIFF_MAX; the use of SIZE_MAX is deliberate here. */ DIAG_IGNORE_NEEDS_COMMENT (8, "-Wstringop-overflow="); #endif +#if __GNUC_PREREQ (11, 0) + /* Likewise GCC 11, with a different warning option. */ + DIAG_IGNORE_NEEDS_COMMENT (11, "-Wstringop-overread"); +#endif if (c != '\0') return memchr (s, c, (size_t)-1); DIAG_POP_NEEDS_COMMENT; |