]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
posix: Fix fnmatch build with gcc-16
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 20 Jun 2025 14:35:56 +0000 (11:35 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 23 Jun 2025 14:45:03 +0000 (11:45 -0300)
The master branch started to enable some warnings due to optimization
that were only triggered with -Os [1].  Enable the suppression regardless
of optimization level.

Checked on aarch64-linux-gnu build.

[1] https://gcc.gnu.org/pipermail/gcc-regression/2025-June/082378.html
Reviewed-by: Sam James <sam@gentoo.org>
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
posix/fnmatch_loop.c

index 9ec5e0edc656a774b3d1ab43c86755fe0c236672..83f8861653673058e0ba80368d7b54629661aee6 100644 (file)
@@ -537,7 +537,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                                   that it was properly set in the loop
                                   above.   */
                                 DIAG_PUSH_NEEDS_COMMENT;
-                                DIAG_IGNORE_Os_NEEDS_COMMENT (8, "-Wmaybe-uninitialized");
+                                DIAG_IGNORE_NEEDS_COMMENT (16, "-Wmaybe-uninitialized");
                                 if (! is_range
 
 # if WIDE_CHAR_VERSION
@@ -560,7 +560,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                                   above it will be properly set by the loop.
                                   */
                                 DIAG_PUSH_NEEDS_COMMENT;
-                                DIAG_IGNORE_Os_NEEDS_COMMENT (8, "-Wmaybe-uninitialized");
+                                DIAG_IGNORE_NEEDS_COMMENT (16, "-Wmaybe-uninitialized");
                                 cold = wextra[1 + wextra[0]];
                                 DIAG_POP_NEEDS_COMMENT;
 # else
@@ -745,7 +745,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                                        means that it was properly set in the
                                        loop above.   */
                                     DIAG_PUSH_NEEDS_COMMENT;
-                                    DIAG_IGNORE_Os_NEEDS_COMMENT (8, "-Wmaybe-uninitialized");
+                                    DIAG_IGNORE_NEEDS_COMMENT (16, "-Wmaybe-uninitialized");
                                     cend = wextra[1 + wextra[0]];
                                     DIAG_POP_NEEDS_COMMENT;
 # else
@@ -754,7 +754,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                                       wextra above it will be properly set by
                                       the loop.   */
                                     DIAG_PUSH_NEEDS_COMMENT;
-                                    DIAG_IGNORE_Os_NEEDS_COMMENT (8, "-Wmaybe-uninitialized");
+                                    DIAG_IGNORE_NEEDS_COMMENT (16, "-Wmaybe-uninitialized");
                                     idx += 1 + extra[idx];
                                     DIAG_POP_NEEDS_COMMENT;
                                     /* Adjust for the alignment.  */