diff --git a/stdio-common/bug-vfprintf-nargs.c b/stdio-common/bug-vfprintf-nargs.c index c7e7f0b..7406b7a 100644 --- a/stdio-common/bug-vfprintf-nargs.c +++ b/stdio-common/bug-vfprintf-nargs.c @@ -24,6 +24,7 @@ #include #include #include +#include static int format_failed (const char *fmt, const char *expected) @@ -65,7 +66,13 @@ do_test (void) test this on 32-bit systems. */ if (sizeof (long int) == 4) { + /* On S390 31bit, gcc emits the warning: + format ‘%d’ expects argument of type ‘int’, + but argument 3 has type ‘long unsigned int’. */ + DIAG_PUSH_NEEDS_COMMENT; + DIAG_IGNORE_NEEDS_COMMENT (5, "-Wformat"); sprintf (buf, "%%1$d %%%" PRIdPTR "$d", UINT32_MAX / sizeof (int)); + DIAG_POP_NEEDS_COMMENT; if (format_failed (buf, "1 %$d") != 0) rc = 1; }