about summary refs log tree commit diff
path: root/stdio-common/tst-printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/tst-printf.c')
-rw-r--r--stdio-common/tst-printf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/stdio-common/tst-printf.c b/stdio-common/tst-printf.c
index 2896b18ecd..ffe7ac7753 100644
--- a/stdio-common/tst-printf.c
+++ b/stdio-common/tst-printf.c
@@ -32,6 +32,11 @@
    The compiler warnings are not useful here.  */
 DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wformat");
 
+#if __GNUC_PREREQ (7, 0)
+/* Compiler warnings about format lengths should also be ignored.  */
+DIAG_IGNORE_NEEDS_COMMENT (7.0, "-Wformat-length");
+#endif
+
 static void rfg1 (void);
 static void rfg2 (void);
 static void rfg3 (void);