@@ -24,6 +24,7 @@
#include <inttypes.h>
#include <string.h>
#include <signal.h>
+#include <libc-internal.h>
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;
}