diff -ruN a/string/strcoll_l.c b/string/strcoll_l.c --- a/string/strcoll_l.c 2021-02-02 02:15:33.000000000 +0900 +++ b/string/strcoll_l.c 2021-09-17 13:36:43.564148616 +0900 @@ -40,7 +40,11 @@ #define CONCAT1(a,b) a##b #include "../locale/localeinfo.h" +/* See Line 178+ */ +DIAG_PUSH_NEEDS_COMMENT; +DIAG_IGNORE_NEEDS_COMMENT (8, "-Wmaybe-uninitialized"); #include WEIGHT_H +DIAG_POP_NEEDS_COMMENT; /* Track status while looking for sequences in a string. */ typedef struct @@ -181,7 +185,7 @@ ensures that seq->save_idx was saved to first and contains a valid value. */ DIAG_PUSH_NEEDS_COMMENT; - DIAG_IGNORE_Os_NEEDS_COMMENT (5, "-Wmaybe-uninitialized"); + DIAG_IGNORE_NEEDS_COMMENT (8, "-Wmaybe-uninitialized"); len = weights[idx++]; DIAG_POP_NEEDS_COMMENT; /* Skip over indices of previous levels. */ @@ -292,7 +296,7 @@ int result = 0, rule = 0; - /* With GCC 7 when compiling with -Os the compiler warns that + /* With GCC 7 and 8 when compiling with -Os the compiler warns that seq1.back_us and seq2.back_us might be used uninitialized. Sometimes this warning appears at locations in locale/weightwc.h where the actual use is, but on architectures other than x86_64, @@ -300,7 +304,7 @@ seq2. This uninitialized use is impossible for the same reason as described in comments in locale/weightwc.h. */ DIAG_PUSH_NEEDS_COMMENT; - DIAG_IGNORE_Os_NEEDS_COMMENT (7, "-Wmaybe-uninitialized"); + DIAG_IGNORE_NEEDS_COMMENT (8, "-Wmaybe-uninitialized"); coll_seq seq1, seq2; DIAG_POP_NEEDS_COMMENT; seq1.len = 0;