1 /* Test for bugs with %z and %Z formats. See PRs c/89, c/156, c/376. */
2 /* Origin: Joseph Myers <jsm28@cam.ac.uk> */
3 /* { dg-do compile } */
4 /* { dg-options "-Wformat" } */
6 typedef __SIZE_TYPE__ size_t;
8 extern int printf (const char *, ...);
9 extern int scanf (const char *, ...);
15 scanf ("%zu", &t); /* { dg-bogus "length|format" "bogus scanf warning" } */
22 printf ("%zu\n", t); /* { dg-bogus "format" "bogus printf warning" } */
25 /* The %Z printf format is an old GNU libc extension to do the same thing. */
30 printf ("%Zu\n", t); /* { dg-bogus "format" "bogus printf warning" } */